prosekit/extensions/commit
-
constructor
-
new CommitRecorder(): CommitRecorder
-
commit
-
Return a commit object including all changes since the last commit.
null
will be returned if there is no change.const commit: () => null | Commit
A JSON representation of a commit.
-
doc: NodeJSON
-
The current doc node in the JSON format
-
parent: NodeJSON
-
The parent node in the JSON format
-
steps: StepJSON[]
-
An array of steps in the JSON format that transform the parent node to the current doc node.
function defineCommitRecorder(commitRecorder: CommitRecorder): PlainExtension
Define an extension that can record the changes in the editor.
function defineCommitViewer(commit: Commit): PlainExtension
Define an extension to display the changes from the given commit in the editor.