make images expandable in markdown preview
parent
1dd20d512d
commit
e1a0e6a03e
|
@ -96,6 +96,11 @@ function markdown(t) {
|
||||||
input = input.replace(/\n\n/g, '<br>')
|
input = input.replace(/\n\n/g, '<br>')
|
||||||
|
|
||||||
document.getElementById(t.dataset.preview).innerHTML = input
|
document.getElementById(t.dataset.preview).innerHTML = input
|
||||||
|
|
||||||
|
const expandable = document.querySelectorAll('img[alt]');
|
||||||
|
for (const element of expandable) {
|
||||||
|
element.onclick = () => {expandImage()};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function charLimit(form, text) {
|
function charLimit(form, text) {
|
||||||
|
|
Loading…
Reference in New Issue