How to get hyperlinked text from a Text node using figma.mixed

Let’s say you have a text node that says “hi, click here to see my dog”
Now, only the words “click here” are hyperlinked. Rest of the text is simple string.

Now I want to be able to pick this text node and find where there is a hyperlinked text and what’s the hyperlink on that text. How can I get that text and it’s hyperlink?

Figma API has a property for TextNode called hyperlink and in this situation it returns a Figma.mixed object.

How do I get what I need out of this??

Use the getRangeHyperlink or getStyledTextSegments methods.

getRangeHyperlink also returns a Symbol(Figma.mixed)
What I’m trying to understand is how to get the information I need out of this Symbol?

Specify the correct range and the method will return you a HyperlinkTarget object. Or use the second method.

Please check out this documentation:

Got it… thanks a lot.