From ce9f1b1309acdf4037c73bdd0c567bc94c2e59ec Mon Sep 17 00:00:00 2001 From: Urban Rotnik Date: Tue, 22 Oct 2019 08:28:35 +0200 Subject: [PATCH] Add mceToken check --- .../javascripts/tinymce/plugins/custom_image_toolbar/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/tinymce/plugins/custom_image_toolbar/plugin.js b/app/assets/javascripts/tinymce/plugins/custom_image_toolbar/plugin.js index 4991b47ab..2e7537563 100644 --- a/app/assets/javascripts/tinymce/plugins/custom_image_toolbar/plugin.js +++ b/app/assets/javascripts/tinymce/plugins/custom_image_toolbar/plugin.js @@ -24,7 +24,7 @@ tinymce.PluginManager.add('custom_image_toolbar', function(editor) { }); function isImage(elem) { - return editor.dom.is(elem, 'img'); + return editor.dom.is(elem, 'img') && elem.dataset.mceToken; } function isMarvinJs(elem) { return elem.dataset.sourceType === 'marvinjs';