DocumentCompareProcessOptions
Options for process.
Properties
aiSource?: AIOperationSourceinheritedmodule:ai/toolkit/documentcompare~DocumentCompareProcessOptions#aiSourceWhich AI feature produced the processed data. You can use one of available values or pass a custom string. When set, the operations applying the patch will be stamped as made-by-AI. This information is passed to suggestions and revisions meta data. Such suggestions and revisions will be visually marked as made-by-AI accordingly to these features config (
config.trackChanges.showAISourceandconfig.revisionHistory.showAISource).Do not set for changes coming from non-AI sources.
asSuggestions?: booleaninheritedmodule:ai/toolkit/documentcompare~DocumentCompareProcessOptions#asSuggestionsWhether the comparison marks removed content for track changes instead of removing it.
overwriteOnError?: booleanmodule:ai/toolkit/documentcompare~DocumentCompareProcessOptions#overwriteOnErrorWhat to do when diffing or applying the processed data fails.
By default, the underlying error is rethrown.
When the option is set to
true, the whole document is instead overwritten with the processed data viaeditor.setData()andprocessreturnsfalse.The overwrite ignores the
asSuggestionsandaiSourceoptions, so the content is replaced directly and is not marked as an AI change. It cannot be undone, and it clears the undo stack.This option does not cover errors thrown by
callback, which are always rethrown.Note that the overwrite is also performed in real-time collaboration environment, and it may roll back some edits made by remote users while
callbackwas processing. Opt in only when overwriting the whole document is acceptable.Defaults to
falseuseDataIds?: booleanmodule:ai/toolkit/documentcompare~DocumentCompareProcessOptions#useDataIdsWhether the snapshot handed to
callbackis stamped withdata-idattributes. SeeuseDataIds.Defaults to
true