Can't skip ElementNode on importJSON() #4964
YusukeSuzuki
started this conversation in
General
Replies: 1 comment
-
|
Self resolved, it was correct to filter the payload itself by running $insertDataTransferForRichText from lexical.PASTE_COMMAND instead of using importJSON to resolve it. However, $insertDataTransferForRichText accepts DataTransfer instead of Node Tree objects as arguments, so it was necessary to disassemble $insertDataTransferForRichText and implement it independently. The $insertDataTransferForRichText is a Node Tree object. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
In importJSON(), it is not possible to implement skipping element nodes and adding child nodes according to the condition.
The pseudo-structure is as follows
Since the condition attribute of MyElementNode is bad, I want the result of pasting from the clipboard to be as follows.
The current design of the importJSON() framework does not allow for the return of child nodes or the replacement of serialized child nodes with the tail of the parent, making the above implementation impossible.
Beta Was this translation helpful? Give feedback.
All reactions