Hi Locopon, thanks for the reply... and good to see you back :)
I have to say that the settings options are anything but easy.
They might be easy if one already knew what they were for, but for anyone else it's a total mystery. For example, static, dynamic, rexex, XML, URL, Style list generation, CSS generator mode.. all of these things will mean nothing at all to most users in this context. Even the way it has instance, module and portal at the top as well as at the bottom confused me for a long time.
A good user-interface needs to do more than simply expose the code in a gui; it needs to hide the developer stuff behind simple buttons and options.
The basic option I think most people are after is to make FCK always populate the style dropdown with the current skin styles. If there were a single button to do this, I think most users would be pretty happy.
For everyone else, including mibagict from the post above this one, I'll detail what I find the most useful setup here. I will assume everyone has a Content Editor role that is provided to people who create and publish content on their sites. You should not be using the administrator role for this.
Do this:
- Open web.config
- In the FCK section set these options:
- DynamicStylesGeneratorFilter="controlpanel|filemanager|mainmenu|wizard|module|title|data|grid|tree|menu
|view|eip|label|edit|root|skin|pane|banner|bread|random|photo|suggest|item|Other|page|pop|button|af|ntf|mast
|fck|search|tab|test|left|right|top|bottom|content|middle|help|user|copy|log|event|message"
- StylesDefaultMode="dynamic" (makes FCK use the stylesheets even if you don;t make custom settings)
- CSSDefaultMode="dynamic" (as above)
- DefaultToolbarSet="Basic" (provide the basic toolbar by default)
- OptionsOpenMode="ShowModalDialog"
- CustomOptionsDialog="host" (I only let the host see the settings link)
- Open an instance of FCK in your site and click Show Custom Editor Options
- Click Clear at the bottom, then close the window, and click Refresh editor to clear out any previous settings.
- Click Show Custom Editor Options again
- Click the Portal radio button
- Open the section "List of available styles for the editor" and click the Dynamic radio button
- Open the section "Editor area CSS" and click the Dynamic radio button
- Click the pencil next to Default toolbar
- Place a tick only in the Administrators box, then click the black tick-mark at the far left to save the setting
- Click the pencil next to DNNDefault toolbar
- Place a tick only in the Content Editor box (see comment above about this role), then click the black tick-mark at the far left to save the setting
- Click the pencil next to NoGallery toolbar
- Place a tick only in the box in the Disabled column, then click the black tick-mark at the far left to save the setting
- Check that the dropdown at the bottom of the screen says Portal and click Apply.
- Wait until it refreshes, then close the window
- Click to Refresh the Editor and you will see the styles in action.
Notes:
- My version of the DynamicStylesGeneratorFilter list in point 2 above is pretty extensive and seeks to cut out anything that won't make sense to a Content Editor. You might prefer to reduce the things in the list and instead, add items manually to the "dynamic styles Filter" in the "List of available styles for the editor" section in the custom settings dialogue... phew!
- There must be better ways to narrow the list of styles down and also to make them more logical. I seem to have multiple "Normal" styles on my list, each with a different tag.. "Normal td", "Normal span" and so on. Perhaps the filter can be made to exclude everything apart from specified terms.. i.e. work the other way around?
- The way I've set up the toolbars is so that visitors always get the basic bar, which is plenty for forums and forms etc. Content Editors get a good set of editing buttons, whilst Admins get nearly everything else. I'm not using the NoGallery bar but keep it in case it's needed.
- You might find you need to tweak your skin.css after implementing all this. In particular, you need to make use of both Body and #Body styles in the sheet. FCK will pick up what's in the Body style, but not what's in #Body. Use this fact to stop FCK from using your body background as the background of the editor window.
- Also, you need to specify a default font style and size for just about everything.
- Here's an example of both points above (these are in the same skin.css at the same time):
- #Body{ color: grey; background-image: url(background.png); margin: 18px; text-align: center; }
- Body, table, td, th, div, span, ul, li, blockquote, textarea, tbody, p, tfoot {font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; color: Black;}
I'll paste in my own toolbars here for people to try out. I've removed fontname and fontsize from the general bar because having four dropdowns all for changing text seems ridiculous. I'd like to drop the fontformat one as well soon. All of the styles should be in the Styles dropdown.
FCKConfig.ToolbarSets["Default"] = [
['Style'],['FontFormat'],['FontName'],['FontSize'],
['Bold','Italic','Underline','-','Subscript','Superscript'],
['TextColor','BGColor','SelectAll','RemoveFormat'],
['Cut','Copy','Paste','PasteWord','PasteText'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink'],
['Image','Flash','Table','Rule'],['SpecialChar','Smiley','PageBreak'],
['Undo','Redo','-','Find','Replace'],
['Source','-','Print','SpellCheck']
] ;
FCKConfig.ToolbarSets["DNNDefault"] = [
['Style'],['FontFormat'],
['Bold','Italic'],
['TextColor','BGColor'],
['Cut','Copy','Paste','PasteText'],['SelectAll','RemoveFormat'],
['Undo','Redo'],['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink'],
['Image','Table','Rule'],['SpecialChar','Smiley'],
['Source','SpellCheck']
] ;
FCKConfig.ToolbarSets["NoGallery"] = [
['Style'],['FontFormat'],
['Bold','Italic'],
['TextColor','BGColor'],
['Cut','Copy','Paste','PasteText'],
['Undo','Redo'],['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink'],
['Table','Rule'],['SpecialChar','Smiley'],
['Source','SpellCheck']
] ;
FCKConfig.ToolbarSets["Basic"] = [
['Bold','Italic'],
['JustifyLeft','JustifyCenter'],
['OrderedList','UnorderedList','-','Outdent','Indent','TextColor','Smiley','SpecialChar']
] ;
All in all, it's very cool.. Locopon has made it so that FCK really can be a wysiwyg editor and that's fantastic, but it's all way to complicated for most users to figure out from scratch.
My system above will no doubt change as I get more used to it, and I'm also still very keen to see how others are doing it.
Hope all that helps someone.
Regards,
Rob