RichTextEditor load rtf string

Last post 08-25-2015, 9:56 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  08-22-2015, 3:53 AM 80725

    RichTextEditor load rtf string

    Is it possible to load a RTF string into the editor?

     

    I store RTF code in my database so I need to load it into the editor as a string rather than opening a file.

    Possible?

     

    Thanks

    Chris

  •  08-25-2015, 9:56 AM 80760 in reply to 80725

    Re: RichTextEditor load rtf string

    Hi,

     

    you can use the way below to get the rtf format of the editor content.

     

    RTE.Convertor.RTF.HTML2RTF content= new RTE.Convertor.RTF.HTML2RTF(editor1.Text);

    t1.Text = content.RTF.ToString();



    and you can use the code below to load the rtf format content into editor, it will covers into html.

     

    RTE.Convertor.RTF.RTF2HTML content2 = new RTE.Convertor.RTF.RTF2HTML(t1.Text);

    editor1.Text = content2.ParseRTF(); 

     

    Regards,

     

    Ken 

View as RSS news feed in XML