DNN Blog

Aug 11

Posted by: Will Strohl
8/11/2010 8:51 AM  RssIcon

The default editor in DotNetNuke has been the RadEditor (by telerik) since version 05.02.00.  This editor is very robust and feature rich, including things like spell check, XHTML formatting, and many other advanced features.  It is considered by many to be the best web-based WYSIWYG HTML editor available.  I tend to agree.

With all of those features, it is very possible that some less advanced end-users might not enjoy the toolbar in its default state.  For example, you might want to remove functionality from the default toolbar.  Imagine removing advanced functionality like image maps, code validator, flash manager, etc. 

The editor allows you to customize this user experience very easily.  Unfortunately, there isn’t an option to do this through any of the administration of the website at this time.  You have to have file-level access to modify the files.

DotNetNuke ships with two tool configuration files.  They are:

  • ~/Providers/HtmlEditorProviders/Telerik/Config/ToolsDefault.xml
  • ~/Providers/HtmlEditorProviders/Telerik/Config/ToolsMinimal.xml

The editor uses the “ToolsDefault.xml” file, but you can easily change that by making a single change in the web.config file of your DNN site.

Find the line in your web.config that begins with and change the value for the toolsFile attribute to the new XML tools file.  If you simply change from the ToolsDefault file to the ToolsMinimal file, you will see a significant difference in the two screen shots below.

DotNetNuke RadEditor using ToolsDefault.xml

DotNetNuke RadEditor using ToolsMinimal.xml 

Here is the line of code you’d be changing in the web.config, before and after.

<add name="TelerikEditorProvider" 
    type="DotNetNuke.HtmlEditor.TelerikEditorProvider.EditorProvider, DotNetNuke.HtmlEditor.TelerikEditorProvider" 
    providerPath="~/Providers/HtmlEditorProviders/Telerik/" 
    toolsFile="~/Providers/HtmlEditorProviders/Telerik/Config/ToolsDefault.xml" 
    configFile="~/Providers/HtmlEditorProviders/Telerik/Config/ConfigDefault.xml" 
    FilterHostExtensions="True" />
<add name="TelerikEditorProvider" 
    type="DotNetNuke.HtmlEditor.TelerikEditorProvider.EditorProvider, DotNetNuke.HtmlEditor.TelerikEditorProvider" 
    providerPath="~/Providers/HtmlEditorProviders/Telerik/" 
    toolsFile="~/Providers/HtmlEditorProviders/Telerik/Config/ToolsMinimal.xml" 
    configFile="~/Providers/HtmlEditorProviders/Telerik/Config/ConfigDefault.xml" 
    FilterHostExtensions="True" />

Unfortunately, this change occurs for the entire installation of DNN right now.  So, plan how you minimize your toolbars accordingly.

This post is cross-posted from my personal blog site.

Tags:
Categories: Development
Location: Blogs Parent Separator Will Strohl

11 comment(s) so far...


Gravatar

Re: Customizing the RadEditor in DotNetNuke

Thank you for the tip Will. This would make a nice combo box option in host settings ;-)

PS There is an error on the last line of your "after" the filename should read "ToolsMinimal.xml" not ConfigMinimal.xml"

By Justin Jovic on   8/11/2010 9:17 PM
Gravatar

Re: Customizing the RadEditor in DotNetNuke

Thanks for noticing the typo... I noticed it too, but was hoping no one else would. :) I changed to what it should be. It should've been ConfigDefault.xml.

By Will Strohl on   8/11/2010 9:18 PM
Gravatar

Re: Customizing the RadEditor in DotNetNuke

Thanks for the info Will. What I'd like to be able to do is add back Emoticons for the discussion forums. This was available with FCK, but isn't available for RadEditor without some changes to the provider. Or do you have a clever way to achieve this?

By Roger Selwyn on   8/12/2010 6:40 AM
Gravatar

Re: Customizing the RadEditor in DotNetNuke

@Roger: Thanks for your comments. The great thing about either editor is that they are both extendable. So anyone can add that and other more creative or proprietary options. However, it would be worth adding as an enhancement request to the support area: http://support.dotnetnuke.com/

By Will Strohl on   8/12/2010 6:41 AM
Gravatar

Re: Customizing the RadEditor in DotNetNuke

A workaround until DNN get's more options into it's RADEditor provider is to use Telerik's DNN provider. With that provider you can have custom toolbars for each page in your portal. Still not as good as DNN's FCK provider which will allow you to have custom toolbars for each instance of the editor but might help some people in the short term.

By Greg Brown on   8/12/2010 7:06 PM
Gravatar

Re: Customizing the RadEditor in DotNetNuke

@Will: A number of folks have tried to add back the Emoticons, but the solution has proved elusive. The recommended solution from Telerik (this is one page that shows how - www.telerik.com/help/aspnet-ajax/addcustomdropdowns.html) it not supported by the provider at the moment (as fas I can see). Consequently I have raised as a feature request on Gemini - support.dotnetnuke.com/issue/ViewIssue.aspx?id=12555&PROJID=2. Alex Shirley changed this to a being a bug, since emoticons were provided as standard in the previous editor. It is unfortunately marked as low priority, so I guess may never get done.

@Greg: Can you provide more info on how to use the Telerik DNN provider?

By Roger Selwyn on   8/14/2010 8:54 AM
Gravatar

Re: Customizing the RadEditor in DotNetNuke

@Roger: Excellent work on looking into that and submitting it to Gemini. I would caution you to not feel too discouraged. The majority of the issues in gemini are all marked low priority, but it doesn't mean that they won't get done. In fact most of the actual bugs that I submit that are indeed problems, I mark as low priority. It doesn't mean that it's any more or less important, it's just not a priority in relation to an actual "show stopper."

That being said, there's nothing to prevent you, or any other community member, from writing that piece and submitting the code to the issue you created. I blogged about helping with DNN bug fixes recently.

By Will Strohl on   8/14/2010 9:01 AM
Gravatar

Re: Customizing the RadEditor in DotNetNuke

Don't forget to localize the RadEditor.Main.resx file efor non-english sites because the buttons for changing from Design to Html view will be missing.

By Apartments Split on   8/22/2010 7:36 PM
Gravatar

Re: Customizing the RadEditor in DotNetNuke

I believe the RADEditor should be configurable at the same levels as the previous FCKEditor. Having the same configuration across an entire install is a big backwards step IMO.

I have submitted a feature request for this on Gemini support.dotnetnuke.com/issue/ViewIssue.aspx?id=13666&PROJID=2

By Antony Slater on   8/26/2010 6:42 AM
Gravatar

Re: Customizing the RadEditor in DotNetNuke

@Antony: I agree. Glad you put it as a suggestion in Gemini.

By Will Strohl on   8/26/2010 6:42 AM
Gravatar

Re: Customizing the RadEditor in DotNetNuke

For the record - I am adding Smileys to the new DNN 6 RadEditor and used this method here -http://radeditor.codeplex.com/discussions/231612 - you can see it in action on www.pokerdiy.com

By Rodney Joyce on   2/20/2012 11:26 AM
Attend A Webinar
Free Demo Site
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me
Have Someone Contact Me
Charlotte DoDNN

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Exact Target Exec Alert
PowerDNN
r2integrated

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates the DotNetNuke Store where users purchase third party apps for the platform.