Edit this page

Code Snippets

The Code snippets dropdown is a convenient tool for inserting predefined chunks of content (HTML) like signatures, product description templates, custom tables, etc. These chunks of content are kept in the Snippets collection. You can add to the Snippets collection by modifying the ToolsFile.xml / ListToolsFile.xml files, located in the following folder:

/Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/6.x.x.0__1f131a624888eeed/Resources/

For the HTML code to be interpreted correctly in the XML file, enclose the code in <![CDATA[ &cd;> as shown in the example below:

  <snippet name="Product Template">
        <div style="width:300px;border:2px outset #D8D2BD;padding:34px;font-family:Arial, Verdana; font-size:11px;background- color:#F1EFE6;">
Dear ********************,<br>
Thank you for inquiring about ************. Your request will be processed in 48 hours and shipped at the address you have provided.
<b>Please, contact us if you have any problems.</b>
  <snippet name="Signature">
        <strong>John Smith</strong><br>Sales Manager<br>

To set an image icon in an "Insert Code Snippet" item, put an IMG tag either in front of or next to the Title inside the name attribute of the respective snippet tag: <snippet name="<img src='http://www.telerik.com/RadControls/Editor/Skins/Custom/buttons/AjaxSpellCheck.gif' />Order Confirmation">

You should also encode the < and > tags symbols of the IMG tag with &lt; and &gt;.