From 11c6ffd946422ee27e4fa7ebec7da4a73374e185 Mon Sep 17 00:00:00 2001 From: gldrk Date: Wed, 29 Nov 2023 08:31:16 +0000 Subject: [PATCH] Formatting buttons: update preview when all text is deleted --- files/assets/js/marked.custom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/assets/js/marked.custom.js b/files/assets/js/marked.custom.js index 4f8d9df6f..47388160c 100644 --- a/files/assets/js/marked.custom.js +++ b/files/assets/js/marked.custom.js @@ -60,7 +60,7 @@ marked.use({ function markdown(first, second) { var input = document.getElementById(first); var dest = document.getElementById(second); - if(dest && input && input.value.trim() !== ''){ + if(dest && input){ for (var i = 0; i < dest.children.length; i++) { dest.removeChild(dest.children[i]); }