I can get hyperlink if its linking ALL the text not when it is partial text

In this case for example (shapewithtext)

sel.text.hyperlink.value doesn’t give hyperlink as hyperlink is undefined. Did I miss something or it is expected ?

1 Like

I get undefined : do you spot anything wrong ?

let hyperlinkTarget = (((sel as ShapeWithTextNode).text).getRangeHyperlink(0, sel.text.characters.length)) as HyperlinkTarget;
hyperlink = hyperlinkTarget.value;

You are again getting the link on the whole node. If you have a link only on the part of the node, the range needs to be just that part, otherwise it’s mixed. If you don’t know the exact range, you should process the text character by character to find the characters with links.

1 Like

Oh thanks, I didn’t suspect it could be so circumvulated (for style I can understand it’s character by character but for hyperlink it’s a whole so it’s weird for me) but will try again :slight_smile: