-
-
Notifications
You must be signed in to change notification settings - Fork 591
Description
Hi Blocknote team,
Thanks for the amazing work on this library. it’s been a pleasure building with it!
While implementing a custom feature, I needed to make a small change to the document node and wanted to replace it with a modified version. In the process, I noticed that the code assumes the top node is schema.nodes.doc
. One place I saw the code is in the BlockNoteTipTapEditor
file to update the createAndFill
method.
However, ProseMirror provides a schema.topNode
property, which would allow more flexibility for those customizing the schema, especially when the top-level node isn’t doc.
Would it make sense to use schema.topNode
instead of schema.nodes.doc
? This change would allow advanced users to safely modify or replace the top node in more dynamic ways.
Not sure if this was a design decision, but happy to discuss or submit a PR if it’s a fit!
Thanks again