There is a GetCurrentContentControl method to get the Content Control that is selected.
Is there a way to get a list of the Content Controls for all the range of text that is selected? E.g. if I highlight a range of content, can I retrieve a list of all the content controls in that selection?
Furthermore, is it possible to get the XML structure of the selected content?
In general, this can be done in such way:
- Get selected text as
range with GetRangeBySelect method;
- Get all paragraphs from
range with GetAllParagraphs method;
- For each
paragraph get Content Controls with GetAllContentControls method;
- Sort Content Controls by types (
I’m afraid no. How do you want to use that XML structure? Basically, what is your usage scenario?