Ticket #4651: 4651.patch

File 4651.patch, 1.4 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/styles/plugin.js

     
    302302
    303303                // Get the DTD definition for the element. Defaults to "span".
    304304                var dtd = CKEDITOR.dtd[ elementName ] || ( isUnknownElement = true, CKEDITOR.dtd.span );
     305                // <ins> and <del> should be always consider as inline elements when applying them. (#4651)
     306                if ( elementName in { ins : 1, del : 1 } )
     307                {
     308                        dtd = CKEDITOR.tools.clone( dtd );
     309                        CKEDITOR.tools.exclude( dtd, CKEDITOR.dtd.$block );
     310                }
    305311
    306312                // Bookmark the range so we can re-select it after processing.
    307313                var bookmark = range.createBookmark();
  • _source/core/tools.js

     
    167167                        return target;
    168168                },
    169169
     170                exclude : function ( obj, exclusion )
     171                {
     172                        for ( var i in obj )
     173                        {
     174                                if( obj.hasOwnProperty( i ) && ( obj[ i ] == exclusion[ i ] ) )
     175                                        delete obj[ i ];
     176                        }
     177                },
     178
    170179                /**
    171180                 * Creates an object which is an instance of a class which prototype is a
    172181                 * predefined object. All properties defined in the source object are
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy