+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / RadEditor Snippets not showing

RadEditor Snippets not showing

6 posts, 1 answered
  1. Scott MacDonald
    Scott MacDonald avatar
    29 posts
    Registered:
    08 Mar 2006
    03 May 2013
    Link to this post
    Hi,

    I have created a custom ToolsFile.xml to include the snippet functionality. The snippet icon shows on the toolbar but my test snippet doesn't show in the dropdown. Attached is a screenshot and below is the contents of my ToolsFile.xml file. Any help would be greatly appreciated.

    Thanks,

    Scott

    <?xml version="1.0" encoding="utf-8" ?>
    <root>
        <modules>
            <module name="RadEditorStatistics" dockingZone="Bottom" visible="false" />
            <module name="RadEditorDomInspector" visible="false" />
            <module name="RadEditorNodeInspector" visible="false" />
            <module name="RadEditorHtmlInspector" visible="false" />
        </modules>
        <tools name="MainToolbar">
        <tool name="ToggleAdvancedToolbars"/>
        <tool name="Bold" shortcut="CTRL+B"/>
        <tool name="Italic" shortcut="CTRL+I"/>
        <tool separator="true"/>
        <tool name="InsertOrderedList" />
        <tool name="InsertUnorderedList" />
        <tool separator="true"/>
        <tool name="LinkManager" shortcut="CTRL+K"/>
        <tool name="Unlink" shortcut="CTRL+SHIFT+K"/>
        <tool name="ImageManager" shortcut="CTRL+G"/>
        <tool separator="true"/>
        <tool name="AjaxSpellCheck"/>
        <tool separator="true"/>
        <tool name="PasteFromWord" />
        </tools>
        <tools>
        <tool separator="true"/>
        <tool name="JustifyLeft" />
        <tool name="JustifyRight" />
        <tool name="JustifyCenter" />
        <tool name="JustifyFull" />
        <tool separator="true"/>
        <tool name="Indent" />
        <tool name="Outdent" />
      </tools>
      <tools>
        <tool name="FontName" shortcut="CTRL+SHIFT+F"/>
        <tool separator="true"/>
        <tool name="RealFontSize"/>
        <tool separator="true"/>
        <tool name="FormatBlock"/>
        <tool separator="true"/>
        <tool name="ForeColor"/>
        <tool name="BackColor"/>
        <tool separator="true"/>
        <tool name="MediaManager" />
        <tool name="FlashManager" />
        <tool name="DocumentManager" />
      </tools>
      <tools>
        <tool name="InsertParagraph" />
        <tool name="InsertTable" />
    <tools name="DropdownToolbar" dockable="false" />
        <tool name="InsertSnippet" >
          <snippets>
            <snippet name="New HTML Table">
              <![CDATA[         
            <table border="1">
              <tr>
                <td>row 1, cell 1</td>
                <td>row 1, cell 2</td>
              </tr>
              <tr>
                <td>row 2, cell 1</td>
                <td>row 2, cell 2</td>
              </tr>
            </table>
            //]]>
            </snippet>
          </snippets>
        </tool>
        <tool name="InsertSymbol"/>
        <tool name="InsertHorizontalRule" />
        <tool separator="true"/>
        <tool name="Superscript" />
        <tool name="Subscript" />
        <tool separator="true"/>
        <tool name="FormatStripper"/>
        <tool separator="true"/>
        <tool name="FindAndReplace" shortcut="CTRL+F"/>
        <tool name="Print" shortcut="CTRL+P"/>
        <tool name="ToggleScreenMode" />
      </tools>
    </root>
  2. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    08 May 2013
    Link to this post
    Hello Scott,

    The problem is coming from the <snippets> tag which is not child of the <tool> tag, but it should be under the <root>. Take a look at the revised code below:

    <?xml version="1.0" encoding="utf-8" ?>
    <root>
        <modules>
            <module name="RadEditorStatistics" dockingZone="Bottom" visible="false" />
            <module name="RadEditorDomInspector" visible="false" />
            <module name="RadEditorNodeInspector" visible="false" />
            <module name="RadEditorHtmlInspector" visible="false" />
        </modules>
        <tools name="MainToolbar">
        <tool name="ToggleAdvancedToolbars"/>
        <tool name="Bold" shortcut="CTRL+B"/>
        <tool name="Italic" shortcut="CTRL+I"/>
        <tool separator="true"/>
        <tool name="InsertOrderedList" />
        <tool name="InsertUnorderedList" />
        <tool separator="true"/>
        <tool name="LinkManager" shortcut="CTRL+K"/>
        <tool name="Unlink" shortcut="CTRL+SHIFT+K"/>
        <tool name="ImageManager" shortcut="CTRL+G"/>
        <tool separator="true"/>
        <tool name="AjaxSpellCheck"/>
        <tool separator="true"/>
        <tool name="PasteFromWord" />
        </tools>
        <tools>
        <tool separator="true"/>
        <tool name="JustifyLeft" />
        <tool name="JustifyRight" />
        <tool name="JustifyCenter" />
        <tool name="JustifyFull" />
        <tool separator="true"/>
        <tool name="Indent" />
        <tool name="Outdent" />
      </tools>
      <tools>
        <tool name="FontName" shortcut="CTRL+SHIFT+F"/>
        <tool separator="true"/>
        <tool name="RealFontSize"/>
        <tool separator="true"/>
        <tool name="FormatBlock"/>
        <tool separator="true"/>
        <tool name="ForeColor"/>
        <tool name="BackColor"/>
        <tool separator="true"/>
        <tool name="MediaManager" />
        <tool name="FlashManager" />
        <tool name="DocumentManager" />
      </tools>
      <tools>
        <tool name="InsertParagraph" />
        <tool name="InsertTable" />
    <tools name="DropdownToolbar" dockable="false" />
     
        <tool name="InsertSnippet" />
           
         
        <tool name="InsertSymbol"/>
        <tool name="InsertHorizontalRule" />
        <tool separator="true"/>
        <tool name="Superscript" />
        <tool name="Subscript" />
        <tool separator="true"/>
        <tool name="FormatStripper"/>
        <tool separator="true"/>
        <tool name="FindAndReplace" shortcut="CTRL+F"/>
        <tool name="Print" shortcut="CTRL+P"/>
        <tool name="ToggleScreenMode" />
      </tools>
      <snippets>
            <snippet name="New HTML Table">
              <![CDATA[        
            <table border="1">
              <tr>
                <td>row 1, cell 1</td>
                <td>row 1, cell 2</td>
              </tr>
              <tr>
                <td>row 2, cell 1</td>
                <td>row 2, cell 2</td>
              </tr>
            </table>
            //]]>
            </snippet>
          </snippets>
    </root>

    Paste this and you should have it working now.

    Greetings,
    Pavel Benov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    08 May 2013 in reply to Pavel Benov
    Link to this post
    ...still busted though anyway due to the bug in firefox right?...or was that just the css dropdown?
  4. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    13 May 2013
    Link to this post
    Hello Steve,

    The Snippet drop-down is working properly on Firefox as well. 

    Greetings,
    Pavel Benov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    14 May 2013 in reply to Pavel Benov
    Link to this post
    @Pavel
      So is this just ApplyClass then?
    http://www.telerik.com/support/pits.aspx#/public/sitefinity/9633
  6. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    17 May 2013
    Link to this post
    Hi Steve,

    Yes, this issue is only associated with ApplyClass drop-down in Firefox. 

    Greetings,
    Pavel Benov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
6 posts, 1 answered