How do I add a rich text editor to my own custom user control? - General Discussions - General Discussions - Progress Community
 General Discussions

How do I add a rich text editor to my own custom user control?

  • How do I add a rich text editor to my own custom user control?
  • 318875_sitefinity-richtext-question.png
    Can anyone point me to the blog post / documentation / external blog post that explains how to add the Sitefinity rich text editor to my own custom user control? I've built a few user controls for Sitefinity now, so I'm familiar with the javascripts and ascx files needed, but until now, I haven't needed to add a rich text box field to my own control. (because for most rich text needs the content block works fine)

    I've included a screenshot to show what I'm referring to. Thanks!
  • Dan,

    This blog post may be helpful to you. It has examples too! :)

    Hope that helps!
  • That looks like what I need. I'll test it out and update you. Thanks! (Nice post by the way)
  • I'm building a front end widget that posts a new draft blog post, and I need a rich text editor for the guts of the post. And I need to upload images potentially. Do you have an updated link or another example to do this?
  • Hello James,

    You could use RadEditor of Telerik or the extended RadEditor of Sitefinity - HtmlField. In Sitefinity we're using a control called HtmlField for rich text editing and WYSIWYG experience. It wraps RadEditor inside, and has additional scripts implemented to serve the Document manager and Images manager dialogs, so they work properly with Sitefinity libraries.

    To use HtmlField add the following line in the template:
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Fields" Assembly="Telerik.Sitefinity" %>


    Stefani Tacheva
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • fec9501e-37c1-6deb-a958-ff0000446526_htmlfield.png

    Hi Stefani Tacheva,

     I have used the HtmlField in my user control and registered it to sitefinity. But that rich editor is not similar to rich editor in sitefinity please see the image attached, it has only few basic formatting options and more over Formatting Options link is coming at the right top side of the page even i have place the widget at the bottom of the page.

    Can you please provide the additional scripts used to implement to serve the Document manager and Images manager dialogs so that i can have the rich text editor similar to the one in sitefinity.

    Please help me on this.




  • what is the procedure to delete the reply? 

    Can any one delete this reply?
  • You need to add following code to your .ascx file. 

    <%@ Register Assembly="Telerik.Sitefinity" TagPrefix="sfFields" Namespace="Telerik.Sitefinity.Web.UI.Fields" %>

    And you need to use  get_value() and set_value() instead of using val() in its .js file.
    Following are the two links where are well explained examples of how to use  "htmlField" or "RadEditor".

    Creating a widget with sitefinity html field (Rich Text Editor)
    Adding a Rich Text Editor (RadEditor) in a Sitefinity widget

  • So is there a way to get Image Manager and Document Manager working in a custom designer?
  • Never mind, for some odd reason I had the following setting in my HtmlField:



    When I got rid of that, the Image Manager and Document Manager appear to work fine.