Add filterAttrs parameter to toJSON methods #86
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "add-filterAttrs-for-toJSON"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Support to filter useless attrs, like undefind or null
I don't think this is a critical enough feature to include here. You could implement this as a post-processing pass on the JSON output if you really need it.
Where are these stray attrs coming from, in your system?
@marijnh You're right. it indeed isn't a critical feature. Thank you for your reply!
These stray attrs came from tiptap which uses
addAttributesto declare node attributes and also as initial values.github.com/ueberdosis/tiptap@7567acebd6/packages/extension-image/src/image.ts (L77)Yeah, that seems more of a Tiptap problem then. I'm going to close this, and recommend you handle this outside of the core lib.
Pull request closed