You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can tell it's imported correctly because when I paste a url while selecting text it creates a url component instead of replacing the text with the url.
Expected Behavior
The getNode to be called, this worked in version 21.1.5, but since I've updated to 31 it doesn't get called anymore.
Now the target prop is set to undefined and I can't set it through the code above as it used to be possible.
Whatever I try it won't trigger the getNode. I might be misinterpreting the function of getNode.
But it might also have to do with this line in the withLink code having a TODO in it, so I added a fix that solves my main issue of having an undefined field in the data and not being able to store the editor data on the remote:
// TODO: plugineditor.apply=(operation)=>{if(operation.type==='insert_node'){// Fixes unused and undefined 'target' propdeleteoperation.node.target}
Environment
slate: 31.4.3
slate-react: : 0.102.0
browser: chrome
Funding
You can sponsor this specific effort via a Polar.sh pledge below
We receive the pledge once the issue is completed & verified
The text was updated successfully, but these errors were encountered:
TrySpace
changed the title
createLinkPlugin getNode not working (not called?)
createLinkPlugin getNode not working working/ELEMENT_LINK target undefinedMay 12, 2024
Description
getNode
doesn't return the properties set like so:The
target
field is alwaysundefined
which gives me an issue with storing the editor data remotely.Steps to Reproduce
Copy the
createLinkPlugin
and import it and add it to your plugins. (https://platejs.org/docs/link)I can tell it's imported correctly because when I paste a url while selecting text it creates a url component instead of replacing the text with the url.
Expected Behavior
The getNode to be called, this worked in version 21.1.5, but since I've updated to 31 it doesn't get called anymore.
Now the
target
prop is set toundefined
and I can't set it through the code above as it used to be possible.Whatever I try it won't trigger the getNode. I might be misinterpreting the function of
getNode
.But it might also have to do with this line in the
withLink
code having aTODO
in it, so I added a fix that solves my main issue of having anundefined
field in the data and not being able to store the editor data on the remote:Environment
Funding
The text was updated successfully, but these errors were encountered: