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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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.removeNodeandTransform.insertNodetogether 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