This is a migrated thread and some comments may be shown as answers.

How to use snippets with RadHtmlField

1 Answer 68 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Kristoffer Hiestand
Top achievements
Rank 1
Kristoffer Hiestand asked on 25 Sep 2008, 11:58 AM
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.

1 Answer, 1 is accepted

Sort by
0
Accepted
George
Telerik team
answered on 25 Sep 2008, 02:18 PM
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.
Tags
WebParts for SharePoint
Asked by
Kristoffer Hiestand
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or