Developers¶
The contracts a module or a theme builds on are the documents in this section. Past them, the reference is the code, in the repository, and the reasons for it are in the decision records.
Extending¶
docs/extending.md documents the seams a module can build on: the BlockNoteBlock plugin that declares a block's property schema, version, validation, referenced entities and rendering on the server; the three optional interfaces that give a block per-format settings, something to tell the editor, and a way to heal a stored property the format has stopped permitting; its own Twig template; the Drupal.blocknote client runtime, registering a block specification, with the caption, formatting toolbar items and block menu groups it declares, or a slash-menu item against it, and altering the editor's options; and the Vite preset that builds an extension bundle resolving React and BlockNote off the runtime rather than shipping its own. A custom inline content type is added on the same terms, through the BlockNoteInlineContent plugin and registerInlineContent(). A block or inline content type added that way needs no patch to this module and no rebuild of its bundle.
docs/workflows.md documents the other half: what a module that observes or changes a document it did not author builds on, which is the repository that reads a document at a chosen revision, the updater that proposes a change against the revision and the bytes the caller last saw, and the saved, deleted and client lifecycle events it can subscribe to.
docs/converting.md documents the HTML converter, which turns formatted text such as a CKEditor body into a document, what it leaves behind and its report, drush blocknote:convert-html, which converts one snippet, and drush blocknote:convert, which converts a field's stored values; docs/extending.md section 14 is how a module adds conversion rules for its own markup. The converter is experimental.