diff --git a/files/assets/js/markdown.js b/files/assets/js/markdown.js index 698716e93..98dcfe09b 100644 --- a/files/assets/js/markdown.js +++ b/files/assets/js/markdown.js @@ -96,6 +96,11 @@ function markdown(t) { input = input.replace(/\n\n/g, '
') 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) {