This is a migrated thread and some comments may be shown as answers.

MOSSRadEditor toolbar options aren't working?

2 Answers 64 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Delphi asked on 12 May 2010, 09:57 PM

I just finishing battling getting the MOSSRadEditor into WSS3. The hyperlink manager works and things look good. Before I switched to MOSSRadEditor I was using RadEditor and it worked very well, I specified font sizes, and some custom toolbars. When I switch it to MOSSRadEditor I lost all of this cool stuff, AND the toolbar only appears when I click the content area, I'd rather it stay available at all times.

Here's my HTML

<rad:MOSSRadEditor ID="RadEditor1" runat="server" ToolbarMode="Default" ToolsFile="tools.xml"   
   ContentAreaCssFile="edit.css" OnClientCommandExecuting="OnClientCommandExecuting">  
        <telerik:EditorRealFontSize Value="10pt" /> 
        <telerik:EditorRealFontSize Value="12pt" /> 
        <telerik:EditorRealFontSize Value="14pt" /> 
        <telerik:EditorRealFontSize Value="16pt" /> 
        <telerik:EditorRealFontSize Value="18pt" /> 

Some javascript
<script type="text/javascript">  
    function OnClientCommandExecuting(editor, args) {  
        var name = args.get_name(); //The command name  
        var val = args.get_value(); //The tool that initiated the command  
        if (name == "DynamicDropdown" || name == "DynamicSplitButton") {  
            //Cancel the further execution of the command  

code behind is

    EditorToolGroup toolbar = new EditorToolGroup();  
    EditorDropDown ddn = new EditorDropDown("DynamicDropdown");  
    ddn.Text = "Layout Elements";  
    ddn.Attributes["width"] = "110px";  
    ddn.Attributes["popupwidth"] = "240px";  
    ddn.Attributes["popupheight"] = "100px";  
    ddn.Items.Add("2 Column Table""<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"620\"><tbody><tr><td style=\"font-weight: bold\" valign=\"top\" width=\"120\"></td>" +  
            "<td valign=\"top\" width=\"400\"></td></tr><tr><td colspan=\"2\"><hr/></td></tr><tr><td style=\"font-weight: bold\" valign=\"top\" width=\"120\"></td>" +  
            "<td valign=\"top\" width=\"400\"></td></tr><tr><td colspan=\"2\"><hr/></td></tr><tr><td style=\"font-weight: bold\" valign=\"top\" width=\"120\"></td>" +  
            "<td valign=\"top\" width=\"400\"></td></tr></tbody></table><p>&nbsp;</p><p>&nbsp;</p>");  
    ddn.Items.Add("Page Break""<div class=\"page_break\" style=\"page-break-after:always\"></div>");  
    ddn.Items.Add("Section Header""<table border=\"1\" style=\"border-color: Black;\" width=\"620px\" cellpadding=\"5\" cellspacing=\"0\">" +  
            "<tr class=\"borderedtitle\"><td>V. Section Title</td></tr></table><p>&nbsp;</p><p>&nbsp;</p>");  
    RadEditor1.ToolbarMode = EditorToolbarMode.Default; 

and the display is attached.

2 Answers, 1 is accepted

Sort by
Telerik team
answered on 13 May 2010, 12:02 PM
Hi David,

In order to set properties or tools in RadEditor for MOSS you need to modify the respective ConfigFile.xlm and ToolsFile.xml, which are located in the /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/5.x.x.0__1f131a624888eeed/Resources/ folder. Review the following two articles:
Set Properties Via Config File
Add/Remove tools from the toolbar

Regarding the font size review the following online help article:

If you have nay further questions, I will be glad to answer them.

the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Top achievements
Rank 1
answered on 13 May 2010, 03:46 PM
Perfect! I got it all working following these steps. The one difference I made was not to use the shared xml files, instead I included a tools and config xml files with my feature and reference those from my editor. Works like a charm!
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Top achievements
Rank 1
Share this question