RadEditor Toolsfile causes error

8 posts, 1 answers
  1. Paul
    Paul avatar
    55 posts
    Member since:
    Nov 2010

    Posted 07 Feb 2011 Link to this post

    Hi. I want a simplified configuration of the RadEditor. However, I get an error:

    "The string parameter 'key' cannot be null or empty"

    All I have done is create a new page and add an Editor control. That obviously runs fine. I've created an "Editor" directory in my site and copy BasicTools.xml (from the telerik demos). I then set the editor control's ToolsFile property to reference the xml. Just making that change causes the site not to run and I get the above error message. What's wrong?
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 10 Feb 2011 Link to this post

    Hi Paul,

    I tried to reproduce the problem using the provided information but to no avail.

    This error might occur you have used a separator (<tool separator="true"/>) in a context menu which is not correct and causes the error. If this is not the case, could you please provide more detailed information on the subject? Could you please provide the used tools file, and the RadEditor's configuration? Also, which version of RadControls for ASP.NET AJAX and .NET Framework are used in the application?

    Looking forward to hearing from you,
    Dobromir
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. Paul
    Paul avatar
    55 posts
    Member since:
    Nov 2010

    Posted 10 Feb 2011 Link to this post

    For me it takes 30 seconds to replicate the problem. I've just created a new web form (with a master but the master has little in it and works fine).
    With the new blank page I just drop a RadEditor control onto the page. If I run the page it works fine and the editor works no problem (as it should).
    Back in design mode I select the RadEditor and in properties set the ToolsFile to an xml file that I copied from the Telerik directories. That is all that I do. If I then run the page it fails to run with the error message.

    If I look at the page source it is:

    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <telerik:RadEditor ID="RadEditor1" Runat="server" 
            ToolsFile="~/Editor/BasicTools.xml">
            <Modules>
                <telerik:EditorModule Name="RadEditorStatistics" />
                <telerik:EditorModule Name="RadEditorDomInspector" />
                <telerik:EditorModule Name="RadEditorNodeInspector" />
                <telerik:EditorModule Name="RadEditorHtmlInspector" Visible="False" />
            </Modules>
            <Tools>
                <telerik:EditorToolGroup Tag="MainToolbar">
                    <telerik:EditorTool Name="Print" ShortCut="CTRL+P" />
                    <telerik:EditorTool Name="AjaxSpellCheck" />
                    <telerik:EditorTool Name="FindAndReplace" ShortCut="CTRL+F" />
                    <telerik:EditorTool Name="SelectAll" ShortCut="CTRL+A" />
                    <telerik:EditorTool Name="Cut" />
                    <telerik:EditorTool Name="Copy" ShortCut="CTRL+C" />
                    <telerik:EditorTool Name="Paste" ShortCut="CTRL+V" />
                    <telerik:EditorTool Name="PasteStrip" />
                    <telerik:EditorTool />
                    <telerik:EditorTool Name="Undo" ShortCut="CTRL+Z" />
                    <telerik:EditorTool Name="Redo" ShortCut="CTRL+Y" />
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup Tag="InsertToolbar">
                    <telerik:EditorTool Name="ImageManager" ShortCut="CTRL+G" />
                    <telerik:EditorTool Name="DocumentManager" />
                    <telerik:EditorTool Name="FlashManager" />
                    <telerik:EditorTool Name="MediaManager" />
                    <telerik:EditorTool Name="TemplateManager" />
                    <telerik:EditorTool />
                    <telerik:EditorTool Name="LinkManager" ShortCut="CTRL+K" />
                    <telerik:EditorTool Name="Unlink" ShortCut="CTRL+SHIFT+K" />
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup>
                    <telerik:EditorTool Name="Superscript" />
                    <telerik:EditorTool Name="Subscript" />
                    <telerik:EditorTool Name="InsertParagraph" />
                    <telerik:EditorTool Name="InsertGroupbox" />
                    <telerik:EditorTool Name="InsertHorizontalRule" />
                    <telerik:EditorTool Name="InsertDate" />
                    <telerik:EditorTool Name="InsertTime" />
                    <telerik:EditorTool />
                    <telerik:EditorTool Name="FormatCodeBlock" />
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup>
                    <telerik:EditorTool Name="FormatBlock" />
                    <telerik:EditorTool Name="FontName" ShortCut="CTRL+SHIFT+F" />
                    <telerik:EditorTool Name="RealFontSize" ShortCut="CTRL+SHIFT+P" />
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup>
                    <telerik:EditorTool Name="AbsolutePosition" />
                    <telerik:EditorTool />
                    <telerik:EditorTool Name="Bold" ShortCut="CTRL+B" />
                    <telerik:EditorTool Name="Italic" ShortCut="CTRL+I" />
                    <telerik:EditorTool Name="Underline" ShortCut="CTRL+U" />
                    <telerik:EditorTool Name="StrikeThrough" />
                    <telerik:EditorTool />
                    <telerik:EditorTool Name="JustifyLeft" />
                    <telerik:EditorTool Name="JustifyCenter" />
                    <telerik:EditorTool Name="JustifyRight" />
                    <telerik:EditorTool Name="JustifyFull" />
                    <telerik:EditorTool Name="JustifyNone" />
                    <telerik:EditorTool />
                    <telerik:EditorTool Name="Indent" />
                    <telerik:EditorTool Name="Outdent" />
                    <telerik:EditorTool />
                    <telerik:EditorTool Name="InsertOrderedList" />
                    <telerik:EditorTool Name="InsertUnorderedList" />
                    <telerik:EditorTool />
                    <telerik:EditorTool Name="ToggleTableBorder" />
                    <telerik:EditorTool Name="XhtmlValidator" />
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup>
                    <telerik:EditorTool Name="ForeColor" />
                    <telerik:EditorTool Name="BackColor" />
                    <telerik:EditorTool Name="ApplyClass" />
                    <telerik:EditorTool Name="FormatStripper" />
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup Tag="DropdownToolbar">
                    <telerik:EditorTool Name="InsertSymbol" />
                    <telerik:EditorTool Name="InsertTable" />
                    <telerik:EditorTool Name="InsertFormElement" />
                    <telerik:EditorTool Name="InsertSnippet" />
                    <telerik:EditorTool Name="ImageMapDialog" />
                    <telerik:EditorTool Name="InsertCustomLink" ShortCut="CTRL+ALT+K" />
                    <telerik:EditorTool />
                    <telerik:EditorTool Name="ConvertToLower" />
                    <telerik:EditorTool Name="ConvertToUpper" />
                    <telerik:EditorTool />
                    <telerik:EditorTool Name="Zoom" />
                    <telerik:EditorTool Name="ModuleManager" />
                    <telerik:EditorTool Name="ToggleScreenMode" ShortCut="F11" />
                    <telerik:EditorTool Name="AboutDialog" />
                </telerik:EditorToolGroup>
            </Tools>
            <Content>
    </Content>
        </telerik:RadEditor>
        <p>
            <br />
        </p>
    </asp:Content>

    The xml file that I copied over was BasicTools.xml and its entire content is:

    <root>
      
        <tools name="MainToolbar" >
          <tool name="FindAndReplace" />
            <tool separator="true"/>
            <tool name="Undo" />
            <tool name="Redo" />
            <tool separator="true"/>
            <tool name="Cut" />
            <tool name="Copy" />
            <tool name="Paste" />
        </tools>
      
        <tools name="Formatting" >
            <tool name="Bold" />
            <tool name="Italic" />
            <tool name="Underline" />
            <tool separator="true"/>
            <tool name="ForeColor" />
            <tool name="BackColor"/>
            <tool separator="true"/>
            <tool name="FontName"/>
            <tool name="RealFontSize"/>
        </tools>
      
    </root>

    There is a separator but I just copied the xml file so assumed all was ok. All I want is a minimal configuration editor. Thanks
  4. Paul
    Paul avatar
    55 posts
    Member since:
    Nov 2010

    Posted 10 Feb 2011 Link to this post

    I've just deleted all of the separator items from the xml so that it is:
    <root>
      
        <tools name="MainToolbar" >
          <tool name="FindAndReplace" />
            <tool name="Undo" />
            <tool name="Redo" />
            <tool name="Cut" />
            <tool name="Copy" />
            <tool name="Paste" />
        </tools>
      
        <tools name="Formatting" >
            <tool name="Bold" />
            <tool name="Italic" />
            <tool name="Underline" />
            <tool name="ForeColor" />
            <tool name="BackColor"/>
            <tool name="FontName"/>
            <tool name="RealFontSize"/>
        </tools>
      
    </root>

    I deleted the RadEditor from the page, dropped a new RadEditor onto the page and set its ToolsFile to the xml file ==> same problem, doesn't run
  5. Answer
    Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 15 Feb 2011 Link to this post

    Hi Paul,

    Thank you for the additional information. The problem seems to be related to the fact that the tools are configured twice when using the VisualStudio design time to set the RadEditor's ToolsFile property in .NET 4.0. I have logged this issue to our database and we will do our best to fix it for one of the upcoming releases.

    For the time being, in order to avoid this problem you can either remove the separators from the toolsfile or remove the inline registration of the tools from the code that is automatically generated from the .

    As a small token of gratitude I have updated your Telerik points.

    Greetings,
    Dobromir
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  6. Roger Manderville
    Roger Manderville avatar
    4 posts
    Member since:
    Aug 2008

    Posted 03 Mar 2011 Link to this post

    I am getting this same error. In your reply, you did not finish your sentence... Below is what you said...

    For the time being, in order to avoid this problem you can either remove the separators from the toolsfile or remove the inline registration of the tools from the code that is automatically generated from the .

    Generated from the what???

    thanks,
    Roger
  7. Roger Manderville
    Roger Manderville avatar
    4 posts
    Member since:
    Aug 2008

    Posted 03 Mar 2011 Link to this post

    I find that if I delete the markup added when the toolfile was specified and just leave the reference to the toolfile then it works fine.

    thanks,
    Roger
  8. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 08 Mar 2011 Link to this post

    Hi Roger,

    Please accept my sincere apologies.

    Here is the complete sentence:
    For the time being, in order to avoid this problem you can either remove the separators from the toolsfile or remove the inline registration of the tools from the markup that is automatically generated when using VisualStudio Design-Time.

    Regards,
    Dobromir
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top