Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
590
How to Implement XAMRichText Editor and saved all editing content ?
posted

Hi,

We are just adding a Feed Back Form and we want to add Infragistics Rich Text Editor.  In this Container need to add Rich text Content editing like MS Word and save all data in database as well. Please guide us.

We are trying to add RichText Editor but in XAML Text like below


                                                                   
                                                                   
                                                                   
                                                               
                                                               

ClipboardSerializationProviders are not find in XAMRichText Editor. We have added all Namespace related to rich text editor.

Please let us aware.

Thanks

Parents
No Data
Reply
  • 2151
    Offline posted

    Hello prikanwar,

    To be able to export the xamRichTextEditor document's content in RTF or MS Word format you need to do the following:

    1. Add reference to the following assemblies:
    InfragisticsWPF4.Documents.RichTextDocument.Rtf.v16.2
    InfragisticsWPF4.Documents.RichTextDocument.Word.v16.2

    2. Add the following namespace in your code:
    using Infragistics.Documents.RichText
    (at this point you should be able to use the export methods like RichTextDocument.SaveToRtf or RichTextDocument.SaveToWord)

    3. You can use the following code to obtain the document's content in a format of your choice:
    MemoryStream ms = new MemoryStream();
    this.xamRichTextEditor1.Document.SaveToRtf(ms); // or SaveToWord if need MS Word format
    ms.Position = 0;
    StreamReader sr = new StreamReader(ms);
    string docContent = sr.ReadToEnd();

    Please let me know, if I can be of any further assistance on the matter.

    Sincerely,
    Radko Kolev
    Senior Software Developer

Children