From 3a9777afe8a5c6b913780f49e476ddb09c96b088 Mon Sep 17 00:00:00 2001 From: Claudio-Emmolo <113107618+Claudio-Emmolo@users.noreply.github.com> Date: Tue, 3 Sep 2024 17:48:36 +0200 Subject: [PATCH] Fix previewAdv.js --- src/previewAdv.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/previewAdv.js b/src/previewAdv.js index 6f843cc..8329b08 100644 --- a/src/previewAdv.js +++ b/src/previewAdv.js @@ -98,6 +98,7 @@ tinymce.PluginManager.add('previewAdv', (editor, url) => { continue } // === END BLACKLIST === + console.log(paragraphs[i], pCount) const div = editor.dom.create('div', { class: 'adv-preview', contenteditable: 'false' }) div.style.backgroundColor = '#f3f3f3' @@ -107,7 +108,7 @@ tinymce.PluginManager.add('previewAdv', (editor, url) => { div.style.textAlign = 'center' div.style.margin = '10px 0' div.innerHTML = 'Spazio riservato per la pubblicitĂ ' - editor.dom.insertAfter(div, paragraphs[i]) + paragraphs[i].insertBefore(div, paragraphs[i].firstChild) advCount++ }