Sign up (with export icon)

RevisionHistoryConfig

Api-interface iconinterface

The configuration of the revision history feature.

ClassicEditor
 	.create( {
			revisionHistory: ... // Revision history feature configuration.
		} )
		.then( ... )
		.catch( ... );
Copy code

See all editor options.

Properties

  • Chevron-right icon

    editorContainer : HTMLElement

    The DOM element that contains the DOM structure for the editor.

    This element will be hidden when the user opens the revision history.

  • Chevron-right icon

    requireRevisionName : boolean | undefined

    Indicates if the names for revisions should be required. Defaults to false.

    If set to true, the user will have to provide a name when saving a new revision. If they try to change the existing revision name to an empty string, the revision name will be reverted to the previous value.

    It will still be possible to save a revision without a name using the feature API and to load the existing nameless revisions.

  • Chevron-right icon

    Tells the feature whether it should resume updating previously unsaved revision or should save the previously unsaved revision and create a new revision for the changes that will be introduced after the editor is initialized.

    By default, the previously unsaved revision is resumed after the editor is initialized.

    Note that only unsaved revision can be resumed.

    Note that for real-time collaboration, the unsaved revision will be always resumed if the real-time editing session is still active. In other words, even if this is set to false, the unsaved revision will be resumed, if the editing session did not end since the editor was re-initialized. Keep in mind that [the editing session is active a long time] (https://ckeditor.com/docs/cs/latest/guides/collaboration/data.html#temporary-and-permanent-data) after the last user leaves the document.

  • Chevron-right icon

    showAISource : 'pill' | null | undefined

    Controls if and how the revision history displays the information that a revision or a change was created with the help of AI features.

    Possible values:

    • 'pill' - the original author is preserved and the AI origin is shown next to it:

      • an "Includes AI suggestions" pill is shown in the author row of every revision that includes at least one change or suggestion created with the help of AI features,
      • an individual change created with the help of AI features is labeled with a "using AI" note and a sparkle icon (for example, "Suggested by Joe using AI") when comparing revisions.
    • null - the AI origin is hidden (default).

    The AI origin is detected based on the operations and suggestions stamped by AI features (for example the AI Chat). It is recorded when a revision is saved, regardless of this option, which only controls whether it is displayed. Enabling the option therefore also reveals the origin in revisions saved earlier.

    The accepted values are a subset of config.trackChanges.showAISource, so both features can be configured consistently.

    Defaults to null

  • Chevron-right icon

    showCommentHighlights : boolean | undefined

    Indicates if the comment markers saved in a revision should be highlighted in the revision viewer.

    If set to true, the parts of the content that were commented on are highlighted in the revision viewer the same way as in the editing view. Note that it is only a visual hint, as the revision viewer does not display comment threads.

    Markers of the comment threads that were removed or resolved are never highlighted, as such comments will not be automatically restored.

    Defaults to false

  • Chevron-right icon

    viewerContainer : HTMLElement

    DOM element which contains the DOM structure for revision history viewer.

    This element should be hidden (using CSS) when the editor is initialized. This element will be shown when the user opens the revision history viewer.

  • Chevron-right icon

    viewerEditorElement : HTMLElement

    The DOM element for the revision history viewer editor instance.

    This element will be used to initialize the revision history viewer editor instance and will be replaced by it. It should be empty.

  • Chevron-right icon

    The DOM element for the revision history viewer sidebar container.

    This element will be used as a container for the revision history viewer. The sidebar content will be inserted into it.