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';