More in this section

Forums / Developing with Sitefinity / Adding a RadEditor field

Adding a RadEditor field

2 posts, 0 answered
  1. Femy
    Femy avatar
    37 posts
    Registered:
    02 Jan 2008
    13 Oct 2008
    Link to this post
    Hi
    How do I add a RadEditor field to the News Module. I am using the News module as Press Release and want to have a section for the About Company info. When I use a textfield  with LongText as valuetype I cannot add any formatting to the text, So I need a RadEditor similiar to the Content. Also how can I get default values in there (other than in the web.config coz having the default in the web.config might not be so useful for the client who is ONLY gonan use the CMS)
    TIA
    FR
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    15 Oct 2008
    Link to this post
    Hi Femy,

    The solution is to create a user control that wraps RadEditor and implements
    ITextControl interface:
    1. Create a user control.
    2. D
    eclare RadEditor control on the user control.
    3. Implement ITextControl interface on the user control.
    4. Implement mandated Text property on the user control. In the get accessor return RadEditor.Content, in the set accessor set RadEditor.Content to the value.
    5. R
    egister your user control in the following templates:
        ~/Sitefinity/Admin/ControlTemplates/News/ControlPanelEdit.ascx
       
    ~/Sitefinity/Admin/ControlTemplates/News/ControlPanelInsert.ascx
    6. Replace the textbox with your user control.
    7.
    Set the ID of the user control to the meta key for which you wish to use it

    For your convenience I have attached a user control that provides the described functionality.

    I hope you'll find this helpful.

    All the best,
    Pepi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered