Skip to content
Discussion options

You must be logged in to vote

Hm, yea so to make this work you'd need to split the text node at the point of insertion and create three new nodes like:

TextNode (This is some)
LinkNode
- TextNode(MY LINK TEXT)
TextNode (random text)

There should be a util for this somewhere like splitText, but you'll probably need to get the split point from the Selection offset at the point where the LinkNode is inserted.

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@reactuz
Comment options

Answer selected by mariusplanable
Comment options

You must be logged in to vote
1 reply
@reactuz
Comment options

Comment options

You must be logged in to vote
3 replies
@mariusplanable
Comment options

@timaxlucas
Comment options

@reactuz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants