Extension that adds support for embedded documents.
Must be used with the provided History extension instead of the normal one.
The node view provides isEmbedded and isDeepEmbedded for any child component instances.
If using a custom editor wrapper, you will need to:
Provide the custom editor wrapper component with the embeddedEditorComponentInjectionKey injection key. The component should expose the tiptap editor instance with defineExpose as the editor property.
Provide the document api by creating an instance of the DocumentApi class and providing it with the documentApiInjectionKey.
Provide a ref to it's document's id with the parentEditorIdInjectionKey if it's using ids to load documents so that the EmbeddedNodeview can detect circular embeds and avoid rendering them.
Add the class editor-is-embedded-block to the editor wrapper (it must be the immediate parent of view.dom) so commands such as enter can check if they should act differently. See isEmbeddedBlock.
Extension that adds support for embedded documents.
Must be used with the provided
Historyextension instead of the normal one.The node view provides
isEmbeddedandisDeepEmbeddedfor any child component instances.If using a custom editor wrapper, you will need to:
defineExposeas theeditorproperty.editor-is-embedded-blockto the editor wrapper (it must be the immediate parent of view.dom) so commands such as enter can check if they should act differently. See isEmbeddedBlock.