-
I have a custom element type that has extra attributes like assetId on it. When I hit return from within the element a new copy of the element is created with a new custom id via the createNodeIdPlugin(). But I also want to clear the assetId attribute. How can I do this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You could try overriding |
Beta Was this translation helpful? Give feedback.
-
As @12joan noted, overriding the To do that, when creating my plugin I passed in a custom function for the
And then my override looks like this:
|
Beta Was this translation helpful? Give feedback.
As @12joan noted, overriding the
split_node
operation is the right direction.To do that, when creating my plugin I passed in a custom function for the
withOverrides
:And then my override looks like this: