Skip to content

Commit

Permalink
Issue #56: Firefox and floated images and dragging or replacing (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
indigoxela authored Nov 21, 2023
1 parent 1eaad3f commit 3037f03
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions js/plugins/backdropimage/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,17 @@ tinymce.PluginManager.add('backdropimage', function(editor, url) {
}
});
editor.on('dblclick', function (ev) {
let node = editor.selection.getNode();
if (backdropimageTools.isRegularImg(node)) {
if (backdropimageTools.isRegularImg(ev.target)) {
backdropimageTools.backdropDialog(editor);
ev.stopImmediatePropagation();
}
});
// @see https://github.com/backdrop-contrib/tinymce/issues/56
editor.on('ObjectSelected', function (obj) {
if (obj.target.nodeName != 'IMG') {
return;
}
editor.selection.select(obj.target);
});
// Parser fires when the editor initializes, or the code plugin submits.
editor.parser.addAttributeFilter('data-caption', function (nodes) {
Expand Down

0 comments on commit 3037f03

Please sign in to comment.