From 3c31fcbe6ed59817332bbacbcde677576c5c7650 Mon Sep 17 00:00:00 2001 From: thecodrr Date: Thu, 23 Dec 2021 12:08:49 +0500 Subject: [PATCH] fix(tinymce-plugins): editor is not defined --- packages/tinymce-plugins/attachmentshandler/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/tinymce-plugins/attachmentshandler/index.js b/packages/tinymce-plugins/attachmentshandler/index.js index 7bd13bab6..9498c5c9c 100644 --- a/packages/tinymce-plugins/attachmentshandler/index.js +++ b/packages/tinymce-plugins/attachmentshandler/index.js @@ -80,7 +80,7 @@ function setupUI(editor) { editor.undoManager.transact(() => { editor.execCommand("Delete"); }); - notifyEditorChange(); + notifyEditorChange(editor); }, }); @@ -108,7 +108,7 @@ async function insertImage(editor, image) { editor.insertContent(content); editor.execCommand("mceInsertNewLine"); }); - notifyEditorChange(); + notifyEditorChange(editor); } async function insertFile(editor, file) { @@ -127,7 +127,7 @@ async function insertFile(editor, file) { editor.undoManager.transact(() => { editor.insertContent(content); }); - notifyEditorChange(); + notifyEditorChange(editor); } function formatBytes(bytes, decimals = 2) { @@ -153,6 +153,6 @@ async function dataUriToBlob(uri) { return await response.blob(); } -function notifyEditorChange() { +function notifyEditorChange(editor) { editor.fire("input"); }