Sign up (with export icon)

DocumentCompareProcessOptions

Api-interface iconinterface

Options for process.

Properties

  • Chevron-right icon

    Which 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.showAISource and config.revisionHistory.showAISource).

    Do not set for changes coming from non-AI sources.

  • Chevron-right icon

    asSuggestions?: boolean
    inherited

    Whether the comparison marks removed content for track changes instead of removing it.

  • Chevron-right icon

    What 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 via editor.setData() and process returns false.

    The overwrite ignores the asSuggestions and aiSource options, 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 callback was processing. Opt in only when overwriting the whole document is acceptable.

    Defaults to false

  • Chevron-right icon

    useDataIds?: boolean

    Whether the snapshot handed to callback is stamped with data-id attributes. See useDataIds.

    Defaults to true