X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fshowblocks%2Fplugin.js;h=60f686ad24e5a0debcf82a7c7cbe0bc6dcaabf4e;hb=039a051ccf3901311661022a30afd60fc38130c9;hp=6a5ebc263a37fc6ad0204c34e4d7ebcbf7b4ced2;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/_source/plugins/showblocks/plugin.js b/_source/plugins/showblocks/plugin.js index 6a5ebc2..60f686a 100644 --- a/_source/plugins/showblocks/plugin.js +++ b/_source/plugins/showblocks/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, 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,11 +85,12 @@ 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 = { preserveState : true, + editorFocus : false, exec : function ( editor ) { @@ -117,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', { @@ -150,4 +153,3 @@ For licensing, see LICENSE.html or http://ckeditor.com/license * @example * config.startupOutlineBlocks = true; */ -CKEDITOR.config.startupOutlineBlocks = false;