Ticket #6129: 6129.patch

File 6129.patch, 1.1 KB (added by Sa'ar Zac Elias, 14 years ago)
  • _source/plugins/showblocks/plugin.js

     
    2424                '.%2 h6'+
    2525                '{'+
    2626                        'background-repeat: no-repeat;'+
     27                        'background-position: top %3;'+
    2728                        'border: 1px dotted gray;'+
    2829                        'padding-top: 8px;'+
    29                         'padding-left: 8px;'+
     30                        'padding-%3: 8px;'+
    3031                '}'+
    3132
    3233                '.%2 p'+
     
    8485                        '%1h6.png);'+
    8586                '}';
    8687
    87         var cssTemplateRegex = /%1/g, cssClassRegex = /%2/g;
     88        var cssTemplateRegex = /%1/g, cssClassRegex = /%2/g, backgroundPositionRegex = /%3/g;
    8889
    8990        var commandDefinition =
    9091        {
     
    118119
    119120                        editor.addCss( cssTemplate
    120121                                .replace( cssTemplateRegex, 'background-image: url(' + CKEDITOR.getUrl( this.path ) + 'images/block_' )
    121                                 .replace( cssClassRegex, 'cke_show_blocks ' ) );
     122                                .replace( cssClassRegex, 'cke_show_blocks ' )
     123                                .replace( backgroundPositionRegex, editor.lang.dir == 'rtl' ? 'right' : 'left' ) );
    122124
    123125                        editor.ui.addButton( 'ShowBlocks',
    124126                                {
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy