File tree 1 file changed +4
-2
lines changed
lib/web/mage/adminhtml/wysiwyg/tiny_mce 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ define([
350
350
* @param {String } content
351
351
*/
352
352
setContent : function ( content ) {
353
- this . get ( this . getId ( ) ) . execCommand ( 'mceSetContent' , false , content ) ;
353
+ this . get ( this . getId ( ) ) . setContent ( content ) ;
354
354
} ,
355
355
356
356
/**
@@ -559,10 +559,12 @@ define([
559
559
var selection = editor . selection ,
560
560
dom = editor . dom ,
561
561
rng = dom . createRng ( ) ,
562
+ doc = editor . getDoc ( ) ,
562
563
markerHtml ,
563
564
marker ;
564
565
565
- if ( ! selection . getContent ( ) . length ) {
566
+ // Validate the range we're trying to fix is contained within the current editors document
567
+ if ( ! selection . getContent ( ) . length && jQuery . contains ( doc , selection . getRng ( ) . startContainer ) ) {
566
568
markerHtml = '<span id="mce_marker" data-mce-type="bookmark">\uFEFF</span>' ;
567
569
selection . setContent ( markerHtml ) ;
568
570
marker = dom . get ( 'mce_marker' ) ;
You can’t perform that action at this time.
0 commit comments