FCKEditor ToolbarComboPreviewCSS, anybody tried it out?

Questions about how to use the online - editors and suggestions how to improve them
Post Reply
svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

FCKEditor ToolbarComboPreviewCSS, anybody tried it out?

Post by svasti » Fri Aug 13, 2010 7:06 pm

The fckconfig_cmsimple.js makes it possible to show the same fonts in the format dropdown menu as in the actual text. A woman client of mine requested it and now I am using it always. However, two tiny problems remain. May be some of the experts could point out a solution.

I am referring to:
// ToolbarComboPreviewCSS makes it possible to point the Style and Format toolbar combos to
// a different CSS, avoiding conflicts with the editor area CSS.
// Example:
// FCKConfig.ToolbarComboPreviewCSS = '/mycssstyles/toolbar.css' ;

So I added:
FCKConfig.ToolbarComboPreviewCSS = FCKConfig.BasePath + 'toolbar.css' ;

an placed my toolbar.css in FCKeditor/editor
(The names of the fields are: .SC_Item h1, .SC_Item h2, .SC_Item h3, .SC_Item h4 etc.)
It works nicely.

Question 1:
I would like to put my toolbar.css into FCKeditor / custom_configurations.
What do I have to use instead of "FCKConfig.BasePath" ?

Question 2:
When the cursor is, say, on a h1 heading, the dropdown menu will show all selectable formats correctly except the one on which the cursor is placed. This heading will be in black Sans and in case of h1 in fairly big size. Is there any trick to make FCKEditor choose the toolbar.css in this case also?

Any hints would be much appreciated.

svasti

svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: FCKEditor ToolbarComboPreviewCSS, anybody tried it out?

Post by svasti » Tue Aug 17, 2010 8:28 pm

I kept on testing and found:
FCKConfig.ToolbarComboPreviewCSS = '../custom_configurations/toolbar.css' ;
will look for the toolbar.css in FCKeditor/custom_configurations/.

Here a picture to show that FCKeditor doesn't apply the toolbar.css to the paragraph style where the cursor is:

[ external image ]

The cursor was on my page heading h1. The dropdown list shows h5, h6 correctly styled, as well as h2 (Neue Seite #2).
Only h1 (Neue Seite #1) is unstyled. When the cursor is on a different paragraph, h1 (Neue Seite #1) will again show correctly styled in red trebuchet.

Post Reply