RadEditor Snippets not showing

Posted by Community Admin on 04-Aug-2018 18:01

RadEditor Snippets not showing

All Replies

Posted by Community Admin on 03-May-2013 00:00

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>

Posted by Community Admin on 08-May-2013 00:00

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

Posted by Community Admin on 08-May-2013 00:00

...still busted though anyway due to the bug in firefox right?...or was that just the css dropdown?

Posted by Community Admin on 13-May-2013 00:00

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

Posted by Community Admin on 14-May-2013 00:00

@Pavel
  So is this just ApplyClass then?
http://www.telerik.com/support/pits.aspx#/public/sitefinity/9633

Posted by Community Admin on 17-May-2013 00:00

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

This thread is closed