TrackChanges (track-changes)
@ckeditor/ckeditor5-track-changes/src/trackchanges
A plugin that provides track changes mode for the editor. In track changes mode, all insertions are visually marked and all deletions are not deleted but also visually marked. Unsupported commands are disabled when the editor is in the track changes mode.
Filtering
Properties
-
An adapter object that should communicate with the data source to fetch or save the suggestion data.
Methods
-
addSuggestion( suggestionData ) → Suggestion
Adds suggestion data.
Use this method to load the suggestion data during the editor initialization if you do not use the adapter integration.
Note that the suggestion instance will be available through
getSuggestions
andgetSuggestion
only if the suggestion marker is present in the editor content.Parameters
suggestionData : SuggestionData
The data of a suggestion to add.
Returns
Suggestion
Suggestion instance.
-
getSuggestion( id ) → Suggestion
Returns the suggestion instance for a given ID.
-
getSuggestions( [ options ] = { [options.skipNotAttached], [options.toJSON] } ) → Array.<(Suggestion | Object)>
Returns a list of all
Suggestion
instances existing in the editor.Parameters
[ options ] : Object
-
Properties
[ options.skipNotAttached ] : Boolean
Skip removed suggestions.
Defaults to
false
[ options.toJSON ] : Boolean
Return the data in JSON format (that is compatible with
addSuggestion
).Defaults to
false
Returns
Array.<(Suggestion | Object)>