This question is locked. New answers and comments are not allowed.
Hello,
actually what we need - implement custom HyperLinkInsert modal window - we can't use InsertHyperlinkDialog because we need some extra controls in this modal, no need target dropdown and so on...
So we need implement all functionality which works "before" InsertHyperlinkDialog is shown... i mean - if CaretPosition is "on" hyperlink, i need to select all this link and get HyperlinkRangeStart.HyperlinkInfo.NavigateUri... the same with spans which are not wrapped with Hyperlink elements.. if CaretPosition is on some word this word becomes selected..
tried to do this in some diffrent ways... for example by enumerating all hyperlinks in document, selecting these hyperlinks and then comparing each selection range positions X, Y with CaretPositon X, Y but it doesn't sound good.. also there is some strange behaviour with Y coordinate it has strange values... but its long story.. so the question is: is it possible to implement hyperlinks insert functionality in some easy way without using InsertHyperlinkDialog ?
Thanks
actually what we need - implement custom HyperLinkInsert modal window - we can't use InsertHyperlinkDialog because we need some extra controls in this modal, no need target dropdown and so on...
So we need implement all functionality which works "before" InsertHyperlinkDialog is shown... i mean - if CaretPosition is "on" hyperlink, i need to select all this link and get HyperlinkRangeStart.HyperlinkInfo.NavigateUri... the same with spans which are not wrapped with Hyperlink elements.. if CaretPosition is on some word this word becomes selected..
tried to do this in some diffrent ways... for example by enumerating all hyperlinks in document, selecting these hyperlinks and then comparing each selection range positions X, Y with CaretPositon X, Y but it doesn't sound good.. also there is some strange behaviour with Y coordinate it has strange values... but its long story.. so the question is: is it possible to implement hyperlinks insert functionality in some easy way without using InsertHyperlinkDialog ?
this.editor.Document.EnumerateChildrenOfType<HyperlinkRangeStart>()
this.editor.Document.Selection.SelectAnnotationRange(hyperlinkRangeStart); Thanks