Ticket #9339: remove_styles_9339.patch

File remove_styles_9339.patch, 1.3 KB (added by yiminghe, 12 years ago)

for problem 2

  • styles/plugin.js

     
    763763                                }
    764764                                clonedElement[ boundaryElement.match == 'start' ?
    765765                                                        'insertBefore' : 'insertAfter' ]( boundaryElement );
     766                var boundaryElementChildNodes = boundaryElement.$.childNodes;
     767                var removed = 1;
     768                for ( var boundaryIndex = 0 ;
     769                     boundaryIndex < boundaryElementChildNodes.length ;
     770                     boundaryIndex++ )
     771                {
     772                    var boundaryChild = boundaryElementChildNodes[ boundaryIndex ];
     773                    if(  boundaryChild.nodeType == 3 &&
     774                        ( !boundaryChild.nodeValue || boundaryChild.nodeValue == '\u200b' ) )
     775                    {
     776
     777                    }
     778                    else if ( boundaryChild.nodeType == 1 &&
     779                        boundaryChild.getAttribute( 'data-cke-bookmark' ) )
     780                    {
     781
     782                    }
     783                    else
     784                    {
     785                        removed = 0;
     786                    }
     787                }
     788                if ( removed )
     789                {
     790                    boundaryElement.remove();
     791                }
    766792                        }
    767793                }
    768794                else
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy