prosekit/extensions/commit
CommitRecorder
constructor
new CommitRecorder(): CommitRecorder
commit
- ts
const commit: () => null | Commit
Commit
A JSON representation of a commit.
doc
The current doc node in the JSON format
Type:
NodeJSON
parent
The parent node in the JSON format
Type:
NodeJSON
steps
An array of steps in the JSON format that transform the parent node to the current doc node.
Type:
StepJSON[]
defineCommitRecorder
ts
function defineCommitRecorder(commitRecorder: CommitRecorder): PlainExtension
Define an extension that can record the changes in the editor.
defineCommitViewer
ts
function defineCommitViewer(commit: Commit): PlainExtension
Define an extension to display the changes from the given commit in the editor.