#2869: plugin:blockoutline porting from showblock of v2
-------------------------------+--------------------------------------------
Reporter: garry.yao | Owner: martinkou
Type: New Feature | Status: new
Priority: Normal | Milestone: CKEditor 3.0
Component: UI : Toolbar | Version:
Keywords: Confirmed Review- |
-------------------------------+--------------------------------------------
Comment(by fredck):
You didn't ask for review, by mistake I presume.
* "Always" concatenate strings with the plus sign. The following code:
{{{
'.cke_show_blocks h6' +
'{' +
'background-repeat: no-repeat;' +
'border: 1px dotted gray;' +
'padding-top: 8px;' +
'padding-left: 8px;' +
'}'
}}}
... gets compressed like this, by our smart packager:
{{{
'.cke_show_blocks h6{background-repeat: no-repeat;border: 1px dotted gray
;padding-top: 8px;padding-left: 8px;}'
}}}
You can use the [].join artifact only if you need to insert code values in
the middle of the string, like {{{['Text', variable, 'more text'].join( ''
)}}}... of course, if we are talking about a considerable amount of text.
* Please try to compact more the cssTemplate string with further
replacements. The following strings could be replaced:
* '.cke_show_blocks '
* 'background-image: url(%1images/block_'
* The command definition is to be moved outside the plugins.add function,
as a private var.
* Checking the state != CKEDITOR.TRISTATE_DISABLED in the command exec is
not necessary, as this is done by the command class implementation
automatically.
* A variable caching ( this.state == CKEDITOR.TRISTATE_ON ) in exec() is
not a bad idea also.
* A variable can be assigned to editor.addCommand, avoiding the
this.getCommand( 'showblocks' ) calls.
--
Ticket URL: <http://dev.fckeditor.net/ticket/2869#comment:6>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac