diff --git a/lib/simditor-all.js b/lib/simditor-all.js index 6b95c280..0631209f 100644 --- a/lib/simditor-all.js +++ b/lib/simditor-all.js @@ -3603,12 +3603,12 @@ this.maxWidth = this.editor.opts.maxImageWidth || this.editor.body.width(); this.maxHeight = this.editor.opts.maxImageHeight || $(window).height(); this.editor.on('decorate', function(e, $el) { - return $el.find('img').each(function(i, img) { + return $el.find('img:not([data-non-image])').each(function(i, img) { return _this.decorate($(img)); }); }); this.editor.on('undecorate', function(e, $el) { - return $el.find('img').each(function(i, img) { + return $el.find('img:not([data-non-image])').each(function(i, img) { return _this.undecorate($(img)); }); }); diff --git a/lib/simditor.js b/lib/simditor.js index 5fec3160..4449667a 100644 --- a/lib/simditor.js +++ b/lib/simditor.js @@ -3163,12 +3163,12 @@ this.maxWidth = this.editor.opts.maxImageWidth || this.editor.body.width(); this.maxHeight = this.editor.opts.maxImageHeight || $(window).height(); this.editor.on('decorate', function(e, $el) { - return $el.find('img').each(function(i, img) { + return $el.find('img:not([data-non-image])').each(function(i, img) { return _this.decorate($(img)); }); }); this.editor.on('undecorate', function(e, $el) { - return $el.find('img').each(function(i, img) { + return $el.find('img:not([data-non-image])').each(function(i, img) { return _this.undecorate($(img)); }); }); diff --git a/site/assets/scripts/simditor-all.js b/site/assets/scripts/simditor-all.js index 6b95c280..0631209f 100644 --- a/site/assets/scripts/simditor-all.js +++ b/site/assets/scripts/simditor-all.js @@ -3603,12 +3603,12 @@ this.maxWidth = this.editor.opts.maxImageWidth || this.editor.body.width(); this.maxHeight = this.editor.opts.maxImageHeight || $(window).height(); this.editor.on('decorate', function(e, $el) { - return $el.find('img').each(function(i, img) { + return $el.find('img:not([data-non-image])').each(function(i, img) { return _this.decorate($(img)); }); }); this.editor.on('undecorate', function(e, $el) { - return $el.find('img').each(function(i, img) { + return $el.find('img:not([data-non-image])').each(function(i, img) { return _this.undecorate($(img)); }); }); diff --git a/src/buttons/image.coffee b/src/buttons/image.coffee index c356c2b0..e1dfe5a3 100644 --- a/src/buttons/image.coffee +++ b/src/buttons/image.coffee @@ -42,11 +42,11 @@ class ImageButton extends Button @maxHeight = @editor.opts.maxImageHeight || $(window).height() @editor.on 'decorate', (e, $el) => - $el.find('img').each (i, img) => + $el.find('img:not([data-non-image])').each (i, img) => @decorate $(img) @editor.on 'undecorate', (e, $el) => - $el.find('img').each (i, img) => + $el.find('img:not([data-non-image])').each (i, img) => @undecorate $(img) @editor.body.on 'mousedown', '.simditor-image', (e) => diff --git a/src/simditor.coffee b/src/simditor.coffee index 05224a9d..5b0c5403 100644 --- a/src/simditor.coffee +++ b/src/simditor.coffee @@ -2594,11 +2594,11 @@ class ImageButton extends Button @maxHeight = @editor.opts.maxImageHeight || $(window).height() @editor.on 'decorate', (e, $el) => - $el.find('img').each (i, img) => + $el.find('img:not([data-non-image])').each (i, img) => @decorate $(img) @editor.on 'undecorate', (e, $el) => - $el.find('img').each (i, img) => + $el.find('img:not([data-non-image])').each (i, img) => @undecorate $(img) @editor.body.on 'mousedown', '.simditor-image', (e) =>