Updating a link element by pasting a new link #5439
Unanswered
laukaichung
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
CodeSandbox Example:
https://codesandbox.io/s/slate-2-images-and-links-forked-5p6mom
I made a
withLink()
plugin that would automatically linkify a link text when a user pastes a link string into the editor. I'm not sure how to update a link element when the user pastes a new link over it:The problem is that using
Transform.removeNode
andTransform.insertNode
together also removes the previous paragraph node when replacing the link. Do you have any suggestion?Related Code:
Beta Was this translation helpful? Give feedback.
All reactions