Class

RevisionTracker (revision-history)

@ckeditor/ckeditor5-revision-history/src/revisiontracker

class

Follows the changes to the editor content and manages creating revisions.

Filtering

Properties

  • adapter : RevisionHistoryAdapter

    An adapter object that should communicate with the data source to fetch or save the revisions data.

    This property is also set through adapter.

  • isDirty : Boolean

    Informs if any changed happened since the last time a revision was saved.

Methods

  • getCurrentRevision( [ data ] = { [data.name] } ) → Revision

    Returns a revision with the changes that happened since the last saved revision.

    This method does not reset the changes (in contrary to saveRevision so subsequent calls will return revisions with the same data.

    Parameters

    [ data ] : Object

    Revision data.

    Properties
    [ data.name ] : String

    Revision name.

    Returns

    Revision
  • saveRevision( [ data ] = { [data.name] } ) → Revision

    Saves and returns a new revision with changes that happened since the last saved revision.

    Parameters

    [ data ] : Object

    Revision data.

    Properties
    [ data.name ] : String

    Revision name.

    Returns

    Revision