Hello,
We needed to harvest all of the hyperlinks inside the RTF easily. It would great if you guys add a way to iterate all hyperlinks such as "foreach(Hyperlink link in control.Hyperlinks)…" etc…
How to iterate through all hyperlinks within a document
Answers approved by DevExpress Support
Hi Clint,
You can iterate through all hyperlinks within a document by using the RichEditControl.Document.Hyperlinks collection.
Look at the following code snippet:
C#foreach(Hyperlink item in richEditControl1.Document.Hyperlinks) {
string hlText = richEditControl1.Document.GetText(item.Range);
}
The hyperlink collection is not sorted by document range. Is it possible to sort this collection by range?
Hello,
I've created a separate ticket on your behalf (T833558: How to sort the hyperlink collection by hyperlink positions). It has been placed in our processing queue and will be answered shortly.