Ticket #6630: 6630.patch

File 6630.patch, 2.1 KB (added by Garry Yao, 13 years ago)
  • _source/plugins/htmldataprocessor/plugin.js

     
    193193                                                delete element.name;
    194194                                },
    195195
     196                                // Empty <pre> in IE is reported with filler node (&nbsp;).
     197                                pre : function( element ) { CKEDITOR.env.ie && trimFillers( element ); },
     198
    196199                                html : function( element )
    197200                                {
    198201                                        delete element.attributes.contenteditable;
  • _source/core/dom/element.js

     
    254254                },
    255255
    256256                /**
     257                * Retrieve block element's filler node if existed.
     258                */
     259           getBogus : function()
     260           {
     261                   if ( !this.isBlockBoundary() )
     262                           return;
     263
     264                   var lastChild = this.getLast() ;
     265
     266                   // Ignore empty/spaces text.
     267                   while ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.rtrim( lastChild.getText() ) )
     268                           lastChild = lastChild.getPrevious();
     269
     270                   if ( lastChild &&
     271                           ( CKEDITOR.env.ie && lastChild.type == CKEDITOR.NODE_TEXT && CKEDITOR.tools.trim( lastChild.getText() ).match( /^(?:&nbsp;|\xa0)$/ )
     272                           ||   CKEDITOR.env.gecko && CKEDITOR.env.webkit && lastChild.is( 'br' ) ) )
     273                   {
     274                           return lastChild;
     275                   }
     276           },
     277
     278                /**
    257279                 * Breaks one of the ancestor element in the element position, moving
    258280                 * this element between the broken parts.
    259281                 * @param {CKEDITOR.dom.element} parent The anscestor element to get broken.
  • _source/plugins/styles/plugin.js

     
    10251025         */
    10261026        function toPre( block, newBlock )
    10271027        {
     1028                var bogus = block.getBogus();
     1029                bogus && bogus.remove();
     1030
    10281031                // First trim the block content.
    10291032                var preHtml = block.getHtml();
    10301033
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy