X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fshowblocks%2Fplugin.js;h=cbec3141b36f5ed607d72b4ae1d62a4f7e822829;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hp=552cbe47bd224d3070cfa7224b8f7cafcc2e35df;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/plugins/showblocks/plugin.js b/_source/plugins/showblocks/plugin.js index 552cbe4..cbec314 100644 --- a/_source/plugins/showblocks/plugin.js +++ b/_source/plugins/showblocks/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -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', { @@ -145,10 +147,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license /** * Whether to automaticaly enable the "show block" command when the editor - * loads. + * loads. (StartupShowBlocks in FCKeditor) + * @name CKEDITOR.config.startupOutlineBlocks * @type Boolean * @default false * @example * config.startupOutlineBlocks = true; */ -CKEDITOR.config.startupOutlineBlocks = false;