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
35
Extracting styling along with text
posted

I am attempting to grab all of the content out of a xamRichTextEditor (either through xamRichTextEditor.Selection.Range.Text or xamRichTextEditor.Document.GetTextInSpan(<span>), including the styling.  For instance, if I have the following text:

This is sample data.
I am using these as examples.

I am using the types of styling I allow in the editor.

I want to be able to know what letters have the various styling.  I want to know that the "am" in sample is underlined, the "the" in these is bold, the "exam" in example is italicized, and that the line "I am using the types of styling I allow in the editor" is tabbed and a larger font than the rest.  Is there a way to extract that styling data for all or part of the text in the xamRichTextEditor control?  Something along the lines of:

This is s<u>am</u>ple data.
I am using <b>the</b>se as <i>exam</i>ples.

<tab/>I am using the types of styling I allow in the editor.

I know that you can get the CommonCharacterSettings of a node, but from what I've read, if there are multiple styling types in the same node, the settings are null.  I want to be able to paste it into another document type, but maintain all the styling/formatting.  Please let me know if you would like more explanation of what I am looking for.

Thank you!

  • 138253
    Offline posted

    Hello Steve,

     

    Thank you for your post. I have been looking into it and I can suggest you see this forum thread:

     

    http://www.infragistics.com/community/forums/t/93529.aspx

     

    where a similar question is asked and there is a sample showing how to achieve the functionality you want. Please let me know if this helps you or you have further questions on this matter.

     

    Looking forward for your reply.

  • 138253
    Offline posted

    Hello Steve,

     

    I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.