diff --git a/src/previewAdv.js b/src/previewAdv.js index 8329b08..6f843cc 100644 --- a/src/previewAdv.js +++ b/src/previewAdv.js @@ -98,7 +98,6 @@ 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' @@ -108,7 +107,7 @@ tinymce.PluginManager.add('previewAdv', (editor, url) => { div.style.textAlign = 'center' div.style.margin = '10px 0' div.innerHTML = 'Spazio riservato per la pubblicitĂ ' - paragraphs[i].insertBefore(div, paragraphs[i].firstChild) + editor.dom.insertAfter(div, paragraphs[i]) advCount++ }