More in this section

Forums / Developing with Sitefinity / RadEditor returning ITextControl for multiline Metafields

RadEditor returning ITextControl for multiline Metafields

2 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    16 Feb 2006
    11 Dec 2008
    Link to this post

    I try to use RadEditor with more capabilities to implement multiline items like summary. Can use directly or need to implement one ITextControl to return the TextBox in my page and use the result as Metafield?. Could you help us to create one user control that using RadEditor standalone and alow not only one for page but many instances like ImageManagerExtended?.

  2. Pepi
    Pepi avatar
    981 posts
    31 Jan 2017
    11 Dec 2008
    Link to this post
    Hello Pierre,

    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:
    6. Replace the textbox with your user control.
    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.

    the Telerik team

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