Ticket #3977: 3977.patch

File 3977.patch, 1.1 KB (added by Frederico Caldeira Knabben, 15 years ago)
  • _source/plugins/styles/plugin.js

     
    801801                                                if ( match.length == 1 )        // one space, preserve it
    802802                                                        return ' ' ;
    803803                                                else if ( offset == 0 )         // beginning of block
    804                                                         return CKEDITOR.tools.replace( ' ', match.length - 1 ) + ' ';
     804                                                        return CKEDITOR.tools.repeat( ' ', match.length - 1 ) + ' ';
    805805                                                else                            // end of block
    806                                                         return ' ' + CKEDITOR.tools.replace( ' ', match.length - 1 );
     806                                                        return ' ' + CKEDITOR.tools.repeat( ' ', match.length - 1 );
    807807                                        } ) ;
    808808
    809809                        // 3. Convert \n to <BR>.
     
    812812                         blockHtml =  blockHtml.replace( /[ \t]{2,}/g,
    813813                                        function ( match )
    814814                                        {
    815                                                 return CKEDITOR.tools.replace( '&nbsp;', match.length - 1 ) + ' ' ;
     815                                                return CKEDITOR.tools.repeat( '&nbsp;', match.length - 1 ) + ' ' ;
    816816                                        } ) ;
    817817
    818818                        var newBlockClone = newBlock.clone();
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy