Skip to main content
Question

Create text with hyperlink

  • March 31, 2024
  • 1 reply
  • 419 views

gonzalo.vasquez

I’m creating a text from a frame/section selection. I want to convert this text to a link, or add a link property to it. My problem is that my text node doesn’t show the hyperlink property, example: textNode.hyperlink = … It says “hyperlink does not exist on type TextNode” wish is weird cause I see the property in the console.

I also check creating an HyperlinkTarget object passing it the id of my selection wich it works. But how do i pass this to a simple textNode?

This topic has been closed for replies.

1 reply

Text nodes typically don’t support hyperlink properties directly. Instead, you’ll need to wrap your text node within an anchor tag (<a>) or use a specific function designed to handle links if you’re working within a particular development environment or framework.

If you’ve successfully created a HyperlinkTarget object and it recognizes the ID of your selection, you’ll likely need to apply this to an element that supports hyperlinks.

Here’s a basic example if you’re working with HTML:

<a href="your-link-target">Your Text</a>

For more specific advice, I’d need to know the exact environment or framework you’re working in. This could provide a clearer pathway to resolving your issue.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings