RevisionHistory (revision-history)
@ckeditor/ckeditor5-revision-history/src/revisionhistory
The revision history feature.
Enables tracking and bundling changes into revisions as well as provides the default UI for browsing revisions.
To learn more about the revision history feature refer to the Revision history guide.
Filtering
Properties
-
An adapter object that should communicate with the data source to fetch or save the revisions data.
Methods
-
addRevisionData( revisionData ) → Revision
Creates a revision basing on given revision data and adds it to the revision tracker and revision repository.
The parameter of this method should be an object with revision data. You can receive such an object by calling
RevisionHistory#getRevisions( { toJSON: true
)} orRevision#toJSON()
.Parameters
revisionData : Object
Revision data.
Returns
Revision
The created revision.
-
getRevision( revisionIdOrIndex ) → Revision | null
Returns the revision with a given revision id or at a given index.
-
getRevisions( [ options ] = { [options.toJSON] } ) → Array.<(Revision | Object)>
Returns all revisions added to the repository.
Parameters
[ options ] : Object
-
Properties
[ options.toJSON ] : Boolean
Return the data in JSON format.
Defaults to
false
Returns
Array.<(Revision | Object)>
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.