type field in exportJSON
for custom nodes
#3652
Unanswered
IsmailElShinnawy
asked this question in
Q&A
Replies: 1 comment
-
The cleaner way would be to either create a PR so that the |
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
-
Hi, I have been trying to implement an
exportJSON
method forCustomHeadingNode
which extendsHeadingNode
, the problem is thatSerializedHeadingNode
type enforces that the type of the attributetype
to be"heading"
, but I want the customexportJSON
to returntype: "custom_heading"
.As a temporary solution for now I typecast the returned json to
SerializedHeadingNode
, is there a cleaner approach for this?Sandbox: https://codesandbox.io/s/flamboyant-brown-ojhvtq
Beta Was this translation helpful? Give feedback.
All reactions