How to use snippets with RadHtmlField

2 posts, 1 answers
  1. Kristoffer Hiestand
    Kristoffer Hiestand avatar
    1 posts
    Member since:
    May 2008

    Posted 25 Sep 2008 Link to this post

    I am wanting to use Snippets with the Telerik.SharePoint.FieldEditor.RadHtmlField control in my page layouts but there is no property/method (i.e. Snippets.Add()) that allow me to add the snippets to each control.  Is the "snippets" function available for this control?  And if so, how are the snippets added?  If not, is there a work around?  I am using version 5.2.2.0.
  2. Answer
    George
    Admin
    George avatar
    859 posts

    Posted 25 Sep 2008 Link to this post

    Hi Kristoffer,

    You can easily achieve the desired behavior, by adding the snippets in the respective ToolsFile.xml e.g.
    <root>  
       .......  
      <snippets>  
            <snippet name="Order Confirmation">  
                    <![CDATA[  
                        <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.   
                        <br /><br />  
                            <b>Please, contact us if you have any problems.</b>  
                        </div>  
                    ]]>  
                </snippet>  
                <snippet name="Email Signature">  
                    <![CDATA[  
                        <div style="margin-top:30px;width:80%;border-top:1px dotted gray;padding-top:4px;font-family:Arial, Verdana; font-size:11px;">  
                        <b>John Wigham</b><br />  
                        Senior Web Developer<br />  
                            <a href="#">john@mysite.com</a>  
                            <br />  
                                <br />  
                                    <i>Disclaimer: The contents of this e-mail are privileged and confidential and intended for the addressees at the specified e-mail addresses only.</i>  
                        </div>  
                    ]]>  
                </snippet>  
                <snippet name="Problem Report Feedback">  
                    <![CDATA[  
                        <div style="width:300px;border:2px outset #D8D2BD;padding:34px;font-family:Arial, Verdana; font-size:11px;background-color:#F1EFE6;">  
                        Hi ____________________,<br />  
                        Thank you for reporting this issue. We have verified the problem and it is logged in our system. We will notify you once we have a solution.   
                        <br /><br />  
                            <b>Please, contact us if you have any problems.</b>  
                        </div>  
                    ]]>  
                </snippet>  
        </snippets>  
    </root> 

    I hope this helps.

    Sincerely,
    George
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

Back to Top