CRDT Editor Integration Documentation Guidelines
Use this guide when creating or updating CRDT editor integration pages in this directory. The goal is to keep React and framework-agnostic instructions on one page while preserving the initialization and cleanup requirements of each editor.Scope
These guidelines currently cover:- SuperDoc
- Lexical
- TinyMCE
- Monaco
- ProseMirror
- CKEditor
- Apryse
- SpreadJS
- Nutrient
- Ace
- Quill
Verified framework-agnostic sources
Treat the matchingINTEGRATION.md as the source of truth for package names,
public APIs, editor lifecycle, supported options, and cleanup behavior.
When information differs between a source integration and an existing docs
example, verify the current package implementation before changing behavior.
Do not infer framework-agnostic behavior by mechanically removing React hooks.
Page strategy
Each library MUST have one combined documentation page. Do not create separate React and non-React pages. Use the established patterns in these pages:core.mdxtiptap.mdxcodemirror.mdx
React / Next.jsOther Frameworks
When to use tabs
Tabs MUST represent a real framework or API boundary. Do not duplicate every step merely to maintain two parallel versions. UseReact / Next.js and Other Frameworks tabs for:
- Installing framework-specific packages
- Initializing Velt
- Authenticating users and setting document context
- Creating or binding an editor when construction differs
- Subscribing through hooks versus client or manager callbacks
- Configuring encryption through
VeltProviderversus the client API - Cleaning up automatically versus explicitly destroying resources
- Complete working examples
- Conceptual explanations
- Shared configuration options
- Required CSS that does not depend on the framework
- Collaboration behavior
- Troubleshooting guidance
- Shared manager methods and types
- Testing requirements
React ComponentReact HookOther Frameworks
Imperative API tab, rename it to Other Frameworks
and expand it into a complete framework-agnostic lifecycle. A factory call by
itself is not a usable integration example.
Required page structure
Use this order unless the editor has a documented lifecycle requirement that makes a different order necessary:- Frontmatter, introduction, and shared prerequisites
- Setup
- Install dependencies
- Initialize Velt
- Authenticate the user and set document context
- Create or load the editor/viewer
- Initialize collaboration
- Monitor connection and initialization status
- Configure initial content and version management
- Add cursor, selection, or overlay styling
- Add editor-specific collaboration features
- Subscribe to CRDT events
- Configure encryption when applicable
- Handle errors
- Clean up resources
- Notes
- Testing and debugging
- Complete example
- How it works
- API reference and types
Content rules
Prerequisites and terminology
- Keep shared browser, package-manager, Velt account, and editor-license requirements outside tabs.
- Keep React-specific prerequisites inside the React tab or label them clearly.
- Do not describe a combined page or navigation title as React-only.
- Use the editor’s official product name and capitalization consistently.
Velt initialization
- Initialize the Velt client before creating a collaboration manager.
- Authenticate the user before establishing document collaboration.
- Set a stable document ID and editor ID before initializing collaboration.
- Use the same IDs across all collaborators for the same document/editor.
- Describe only readiness conditions that the source implementation actually checks. Do not claim that a hook waits for document context unless it does.
- Prefer the current authenticated provider pattern in React examples. Do not introduce deprecated identification APIs.
Collaboration initialization
- Use the package and exported API from the matching integration source.
- Preserve the editor-specific initialization order.
- Do not initialize or bind the same editor twice.
- If an editor can be attached later, show that as an alternative—not an additional required step.
- Explain whether initial content is applied only to a new collaborative document and how force-reset behavior affects existing state.
Yjs behavior
- Use the Yjs-aware undo/redo implementation required by the binding.
- Disable or omit the editor’s native history plugin when it conflicts with collaborative history.
- Do not create a second Y.Doc or provider when the manager supplies them.
- Avoid multiple bundled copies of Yjs. Duplicate Yjs imports can break shared type identity and synchronization.
- Treat awareness and cursor state as ephemeral presence data, not persisted document content.
Styling
- Include all CSS needed for remote cursors, selections, overlays, and editor content modes used by the example.
- A remote caret MUST remain visibly distinguishable without relying on a later optional snippet.
- When an editor supports iframe and inline modes, explain which styles each mode requires.
Cleanup
- React examples MUST state whether the wrapper or hook performs cleanup.
- Other Frameworks examples MUST explicitly unsubscribe callbacks and destroy the collaboration manager.
- Unless a library-specific source requires another order, unsubscribe callbacks, destroy the collaboration manager so it releases editor listeners, and then dispose or unload the application-owned editor or viewer.
- Preserve source-documented exceptions explicitly. SuperDoc is the inverse: destroy SuperDoc while it can still release the manager-owned provider, then destroy the collaboration manager.
Source filtering
Translate consumer-facing integration behavior, not repository-maintenance material. Exclude the following unless they are necessary for using the SDK:- Demo build commands
- Test selectors and automated test internals
- Repository file maps
- Release and publishing checklists
- Internal implementation details not exposed by the public API
Library-specific requirements
SuperDoc
- Create the collaboration manager before constructing SuperDoc.
- Obtain the Y.Doc and provider through
getCollaborationConfig(). - Pass that configuration to the SuperDoc document.
- Destroy SuperDoc before destroying the collaboration manager.
Lexical
- Create and configure the Lexical editor before collaboration initialization.
- Do not register Lexical’s normal history plugin when collaborative history is active.
- Explain that collaborative undo/redo is backed by Yjs.
- Preserve the automatic remote-cursor overlay behavior.
TinyMCE
- Initialize TinyMCE before creating the collaboration manager.
- State that the package supports both inline and iframe-mode editors.
- Do not prescribe mode-specific skin or content CSS unless a verified source documents those requirements.
- Destroy the collaboration manager before removing the TinyMCE editor.
Monaco
- Show either automatic binding by passing the editor to
createCollaboration()or attach-later binding withbindEditor(). - Never show both binding paths in the same initialization flow.
- Include a visible border or equivalent treatment for remote carets.
- Destroy the collaboration manager before disposing the Monaco editor.
ProseMirror
- Direct plugin wiring MUST use
autoInitialize: false. - Create the collaboration plugins before creating
EditorStateandEditorView. - Attach the completed view with
attachEditorView(). - Call
initialize()only after the view has been attached so remote content can hydrate correctly. - Destroy both the view and collaboration manager during cleanup.
CKEditor
- Create the CKEditor instance before creating the collaboration manager.
- Supplement the source integration with the shared Core Velt initialization, authentication, and document-context flow where needed.
- Do not claim the wrapper waits for conditions that its implementation does not check.
Apryse
- Initialize the WebViewer instance before creating collaboration.
- Destroy the collaboration manager before disposing WebViewer.
- Exclude demo commands, test selectors, repository maps, and release-checklist sections from the public guide.
SpreadJS
- Create the workbook before creating the collaboration manager.
- Recommend passing
GC.Spread.Sheets.Events, and note that fallback event strings are available for simple setups. - Document attach/detach behavior as an alternative lifecycle.
- Destroy the collaboration manager before disposing the workbook.
Nutrient
- Load the viewer before creating collaboration.
- Pass the viewer host as
overlayContainerwhen remote overlays are needed. - Document viewer attach/detach behavior when applicable.
- Destroy the collaboration manager before unloading the Nutrient viewer.
- Do not claim the hook waits for document context unless verified in source.
Ace
- Create the Ace editor before creating collaboration.
- Explain that the wrapper can resolve Ace’s global Range module and that an
explicit
rangeFactoryis optional. - Document attach/detach behavior when applicable.
- Destroy the manager before destroying the editor and removing its DOM.
Quill
- Load the required Quill styles and register
quill-cursorsbefore creating the editor. - Use the Yjs-aware undo/redo path rather than Quill’s standalone history.
- Ensure the application resolves only one compatible Yjs instance.
- Unsubscribe callbacks before destroying the collaboration manager.
Navigation rules
- Keep exactly one
docs.jsonnavigation entry per library. - Keep the CRDT/Multiplayer integration entries alphabetical.
- Do not add separate Other Frameworks navigation entries.
- Remove
Reactfrom combined-page titles and navigation labels unless React is genuinely the only supported integration. - Keep the existing page slug when combining content so published links remain stable.
Recommended implementation order
Update and review the pages one at a time in this order:- SuperDoc
- Lexical
- TinyMCE
- Monaco
- ProseMirror
- CKEditor
- Apryse
- SpreadJS
- Nutrient
- Ace
- Quill
Review checklist
Before considering a page complete, verify all of the following:- The package names and imports match the integration source.
- React and Other Frameworks instructions live on the same page.
- Tab labels and ordering match the established docs convention.
- Shared prose and API tables are not duplicated across tabs.
- Velt initialization, authentication, and document setup occur in the correct order.
- Editor/viewer creation and collaboration initialization follow the source lifecycle.
- The example does not bind the editor twice.
- Initial-content and version behavior is described accurately.
- Undo/redo uses the collaboration-aware implementation.
- Cursor, selection, overlay, skin, and content CSS is complete.
- Framework-agnostic cleanup is explicit and ordered correctly.
- The complete examples agree with the smaller setup snippets.
- Demo-only, test-only, and release-only source material is excluded.
- Troubleshooting includes testing with two authenticated users in separate browser profiles or sessions.
- The page title and navigation label are no longer React-only.
-
docs.jsoncontains one alphabetical entry for the page. - Formatting and link checks pass.

