2026-05-03_14-37-33Z_Sunday #104 shownotes must be provided

This commit is contained in:
2026-05-03 16:37:33 +02:00
parent e59d26d0ea
commit 1612659b44
2 changed files with 16 additions and 1 deletions

View File

@@ -371,6 +371,16 @@ include 'header.php';
}
const form = document.querySelector('form');
form.addEventListener('submit', function (event) {
const text = quill.getText().trim();
if (text.length < 30) {
event.preventDefault();
alert('You must provide shownotes');
}
});
form.addEventListener('formdata', event => {
const rawHTML = quill.getSemanticHTML();
const prettyHTML = prettyPrintHTML(rawHTML);