X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fshowblocks%2Fplugin.js;h=818e8330489a94e141a0a1ca37f346bb6c99a2cb;hp=552cbe47bd224d3070cfa7224b8f7cafcc2e35df;hb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7;hpb=9873d66421922c7aef8be0f5d2ab51e547b19e66 diff --git a/_source/plugins/showblocks/plugin.js b/_source/plugins/showblocks/plugin.js index 552cbe4..818e833 100644 --- a/_source/plugins/showblocks/plugin.js +++ b/_source/plugins/showblocks/plugin.js @@ -24,9 +24,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license '.%2 h6'+ '{'+ 'background-repeat: no-repeat;'+ + 'background-position: top %3;'+ 'border: 1px dotted gray;'+ 'padding-top: 8px;'+ - 'padding-left: 8px;'+ + 'padding-%3: 8px;'+ '}'+ '.%2 p'+ @@ -84,7 +85,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license '%1h6.png);'+ '}'; - var cssTemplateRegex = /%1/g, cssClassRegex = /%2/g; + var cssTemplateRegex = /%1/g, cssClassRegex = /%2/g, backgroundPositionRegex = /%3/g; var commandDefinition = { @@ -118,7 +119,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license editor.addCss( cssTemplate .replace( cssTemplateRegex, 'background-image: url(' + CKEDITOR.getUrl( this.path ) + 'images/block_' ) - .replace( cssClassRegex, 'cke_show_blocks ' ) ); + .replace( cssClassRegex, 'cke_show_blocks ' ) + .replace( backgroundPositionRegex, editor.lang.dir == 'rtl' ? 'right' : 'left' ) ); editor.ui.addButton( 'ShowBlocks', {