Binding to an HTML property

2 posts, 0 answers
  1. Samuel
    Samuel avatar
    2 posts
    Member since:
    Aug 2012

    Posted 18 Jul Link to this post

    I'd like to bind my RichTextEditor to a text property that contains HTML.  If I understand correctly, one needs to import the HTML into the RTE for it to show up as formatted text and then export it to turn it back into HTML.

    I'm wondering whether anyone has used the Format() and Parse() methods of Winforms DataBiinding to accomplish this seamlessly?

    Or is there perhaps a simpler way of binding to an HTML data source that's provided by this Control?

    Thanks in advance.

     

    Michael

  2. Dess
    Admin
    Dess avatar
    2107 posts

    Posted 20 Jul Link to this post

    Hello Michael, 

    Thank you for writing.  

    Currently, RadRichTextEditor internally uses HtmlFormatProvider or TxtFormatProvider when setting the Text property considering the content. If it contains "<html>", RadRichTextEditor uses HtmlFormatProvider to import the text. This allows you to use simple data binding. You can find attached a sample project where it is demonstrated how the RadTextBox.Text property is bound to RadRichTextEditor.Text property. The attached gif file illustrates the available functionality.

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top