A string that uniquely identifies this ProseMirror instance.
The ProseMirror EditorView.
The plugin to track the dirty state of the editor.
Whether this is a collaborative editor.
Optional
options: { document?: any } = {}Additional options.
Optional
document?: anyA document associated with this editor.
Retire this editor instance and clean up.
Have the contents of the editor been edited by the user?
Protected
_disableProtected
Disable source code editing if the user was editing it when new steps arrived.
Protected
_handleProtected
Handle an autosave update for an already-open editor.
The updated editor contents.
Protected
_onProtected
Handle new editing steps supplied by the server.
The offset into the history, representing the point at which it was last truncated.
The entire edit history.
Protected
_resyncProtected
The state of this ProseMirror editor has fallen too far behind the central authority's and must be re-synced.
Protected
_updateProtected
Handle users joining or leaving collaborative editing.
The IDs of users currently editing (including ourselves).
Static
_activateInternal
Listen for ProseMirror collaboration events.
The open websocket.
Static
createCreate a ProseMirror editor instance.
An HTML element to mount the editor to.
Optional
content: string = ""Content to populate the editor with.
Optional
options: {Additional options to configure the ProseMirror instance.
Optional
collaborate?: booleanWhether collaborative editing enabled.
Optional
document?: anyA Document whose content is being edited. Required for collaborative editing and relative UUID generation.
Optional
fieldName?: stringThe field within the Document that is being edited. Required for collaborative editing.
Optional
plugins?: Record<string, Plugin>Plugins to include with the editor.
Optional
props?: objectAdditional ProseMirror editor properties.
Optional
relativeLinks?: booleanWhether to generate relative UUID links to Documents that are dropped on the editor.
Optional
uuid?: stringA string to uniquely identify this ProseMirror instance. Ignored for a collaborative editor.
Protected
Static
_createProtected
Create an EditorView with collaborative editing enabled.
The ProseMirror instance UUID.
An HTML element to mount the editor view to.
The ProseMirror editor state.
The ProseMirror editor plugins to load.
Additional ProseMirror editor properties.
Protected
Static
_createProtected
Create a plain EditorView without collaborative editing.
An HTML element to mount the editor view to.
The ProseMirror editor state.
The ProseMirror editor plugins to load.
Additional ProseMirror editor properties.
Protected
Static
_onProtected
Update client state when the editor contents are autosaved server-side.
The UUID that uniquely identifies the ProseMirror instance.
The updated editor contents.
Protected
Static
_onProtected
Handle new editing steps supplied by the server.
The UUID that uniquely identifies the ProseMirror instance.
The offset into the history, representing the point at which it was last truncated.
The entire edit history.
Protected
Static
_onProtected
Our client is too far behind the central authority's state and must be re-synced.
The UUID that uniquely identifies the ProseMirror instance.
Protected
Static
_onProtected
Handle users joining or leaving collaborative editing.
The UUID that uniquely identifies the ProseMirror instance.
The IDs of the users editing (including ourselves).
A class responsible for managing state and collaborative editing of a single ProseMirror instance.