1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / How to add rich text editor to news summary metafield

How to add rich text editor to news summary metafield

3 posts, 0 answered
  1. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    17 Apr 2010
    Link to this post
    Hi,

    I'm trying to use the rich text editor in a metafield property of an item in the news module (I've created a custom NewsView control), as well as do the same thing with a generic content module custom ContentView.  Basically, we need to be able to enter rich text in the summary field (and in a similar metafield I defined in a new ContentView control based on Generic Content).

    Previously, on a user control I've followed the advice in this KB article:
    http://www.sitefinity.com/support/kb/sitefinity-3-x/implementing-rich-text-property-editor.aspx
    but when the editor launches, it doesn't seem to pay any attention to the editor tools file I've specified.  In addition, it picks up a weird background color that makes it impossible to see the text.  I like this approach, however, because the content author doesn't have to work with the rich text editor unless they specifically need to.  But I'm not sure how to implement it for a metafield in a Content View control, nor am I sure how to get around the problem I ran into with it before.

    I've also used this attribute to get a user control to behave like generic content: 

    [

    ControlDesignerAttribute("Telerik.Cms.Engine.WebControls.Design.GenericContentDesigner, Telerik.Cms.Engine")]

    But since I'm using a ContentView control, this is already being used internally for the main content.  The question is, how do I add a "rich text editor" button to the Summary field, which is plain text?

    Btw, it's Sitefinity Standard, 3.7 SP3

    Regards,
    Mike Sharp

     

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    18 Apr 2010
    Link to this post
    Hi Mike,

    1. For the backend views, you have only to replace the summary TextBox with RadEditor control.

    2. For public controls, you could create a public property with WebEdior that opens the RadEditor or use custom ControlDesigner.

    Let me know if there are any questions.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    19 Apr 2010
    Link to this post
    1.  Oh, right.  That would be too easy!  I guess I was just trying to overcomplicate things. 

    2.  I was having a little trouble with the webeditor approach for a public control though.  You're referring to the approach this article describes, right?  As I mentioned in my post, this was giving me troubles, because I couldn't specify a tools file.  But then I realize from Gabe's post here that I could do the same thing with a user control, so I took the Libraries EditorTemplate.ascx and moved a copy to my user controls folder...this gave me the fine-grained control I needed, and it seems to work fairly well (a couple of minor problems with modal dialog size, but usable).

    Thanks for your help, Ivan!
    Mike 
Register for webinar
3 posts, 0 answered