From c0247ff2bd364fe77138765999713f65d3ac3f18 Mon Sep 17 00:00:00 2001 From: Sergey Mosin Date: Fri, 1 Mar 2024 10:07:14 -0500 Subject: [PATCH] improve: fire the 'squire2-toolbar' event after more props are added --- plugins/compact-composer/js/CompactComposer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/compact-composer/js/CompactComposer.js b/plugins/compact-composer/js/CompactComposer.js index 503d00c9e..668151336 100644 --- a/plugins/compact-composer/js/CompactComposer.js +++ b/plugins/compact-composer/js/CompactComposer.js @@ -114,9 +114,6 @@ this.container = container; - toolbar.className = 'squire-toolbar btn-toolbar'; - const actions = this.#makeActions(squire, toolbar); - plain.className = 'squire-plain'; wysiwyg.className = 'squire-wysiwyg'; wysiwyg.dir = 'auto'; @@ -126,6 +123,9 @@ this.wysiwyg = wysiwyg; this.toolbar = toolbar; + toolbar.className = 'squire-toolbar btn-toolbar'; + const actions = this.#makeActions(squire, toolbar); + this.squire.addEventListener('willPaste', pasteSanitizer); this.squire.addEventListener('pasteImage', (e) => { pasteImageHandler(e, squire);