make images expandable in markdown preview

pull/113/head
Aevann 2023-02-03 05:04:23 +02:00
parent 1dd20d512d
commit e1a0e6a03e
1 changed files with 5 additions and 0 deletions

View File

@ -96,6 +96,11 @@ function markdown(t) {
input = input.replace(/\n\n/g, '<br>')
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) {