Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsFCKeditorFCKeditorCustom styles mayhemCustom styles mayhem
Previous
 
Next
New Post
4/24/2007 5:43 AM
 

Hi there,

I set time aside today to have a shot at devising a workable method that would make FCK provide the portal wtih useful styles from the current skin and in a way that is like that by default rather than have to set it up for each sub-portal.

I got this far:

  • Turned off whitespace filter as mentioned in another post.
  • Set StylesDefaultMode="dynamic" and CSSDefaultMode="dynamic" in the web.config.
  • Added a ton of items to the filter: 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"

 The result is:

  • The DefaultMode settings in web.config don't take affect no matter what I do
  • Instead, I have to set the modes portal-wide to 'dynamic' in the FCK custom editor options for each portal.
  • The filtering seems to work, but I still get endless useless styles in there.. also, most styles on the drop-down have (span) or (td) or similar after them.

I'm left unsure about the right way to go about this to make it work better.

Another issue is all the drop-down lists in FCK.. with Font, Size, Style and Format, the user is left pretty confused... I would expect to only have the 'Style' drop down in the end and have only the relevant styles in there.

Has anyone else got their head around all this and made it work nicely?

Regards
Rob

 
New Post
4/24/2007 7:25 AM
 

Ok, I've figured out what happened to this bit:

  • The DefaultMode settings in web.config don't take affect no matter what I do
  • Instead, I have to set the modes portal-wide to 'dynamic' in the FCK custom editor options for each portal.

The thing to note is that once any custom setting has been made, the entire custom settings dialogue overrides any defaults. Meaning.. even if only the toolbar order is changed and nothing else, all the other items in the dialogue, inlcuding css settings will be applied.... mind you, I find that the default filter still applies even if I don't import it into the custom settings dialogue.

I'm still keen to hear experiences with the entire affair though.

Rob

 
New Post
4/24/2007 9:08 AM
 

Robax

Settings in the web .config work. You must clear your applied settings to portal wide options to allow web.config settings to work

The settings are checked:

1) Instance

2) Module

3) portal

4) Web.config

if a module has defined a instance or portal settings, then web.config settings will not take effect

About the filter, not all people want the same things to be filtered, so we included an option for users to be able to customize that filter. That filter uses RExEx and the possibilities of that are big. (There are people that don't want to filter anything..so we cannot solve all specific cases)

About the toolbars. Most people like the richness of FCK about toolbars. If you don't want a specific toolbar button, you can create your own toolbarset without those buttons.

Easy....don't you think that too?


Locopon
Free modules: E-commerce, Complete localization (Portal, page, module settings, skins, etc.), Secure Login, and more
http://dnn.tiendaboliviana.com
 
New Post
4/25/2007 2:19 AM
 
Hi Locopon

Easy? To be honest no not really...
The Filter has no effect on any of the settings I change.

As an example:
This is what is written in my styles dropdown: "logo (span)", "contentpane (span)", "contentpane (img)", contentpane (td)" and so on.

Can you give me a hint, how the filter should be set as to filter these values out?

And WHERE the filter should be set. I've tried setting the filter in Instance, Module, Portal, web.config separately and all together.
After applying the settings, i click on "Refresh editor" and nothing happens in the styles dropdown.

Style list generation mode: DYNAMIC
CSS Generator mode: DYNAMIC

You advised Robax, he must clear his applied settings to portal wide options to allow web.config settings to work.
How do I clear those settings? I've set the Instance, Module and Portal all back to their default values and clicked on apply. Am I on the right track?

Thanks for a solution!
 
New Post
4/26/2007 8:09 AM
 

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:

  1. Open web.config
  2. 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)
  3. Open an instance of FCK in your site and click Show Custom Editor Options
  4. Click Clear at the bottom, then close the window, and click Refresh editor to clear out any previous settings.
  5. Click Show Custom Editor Options again
  6. Click the Portal radio button
  7. Open the section "List of available styles for the editor" and click the Dynamic radio button
  8. Open the section "Editor area CSS" and click the Dynamic radio button
  9. Click the pencil next to Default toolbar
  10. Place a tick only in the Administrators box, then click the black tick-mark at the far left to save the setting
  11. Click the pencil next to DNNDefault toolbar
  12. 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
  13. Click the pencil next to NoGallery toolbar
  14. 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
  15. Check that the dropdown at the bottom of the screen says Portal and click Apply.
  16. Wait until it refreshes, then close the window
  17. 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

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsFCKeditorFCKeditorCustom styles mayhemCustom styles mayhem


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out