Search

CollaborationAnnotation

VersionDownloads

⚠️ Experiment

Annotations can be used to add additional information to the content, for example comments. They live on a different level than the actual editor content.

Installation

# with npm
npm install @tiptap/extension-collaboration-annotation

# with Yarn
yarn add @tiptap/extension-collaboration-annotation

This extension requires the Collaboration extension.

Settings

OptionTypeDefaultDescription
documentObjectnullAn initialized Y.js document.
fieldString'default'Name of a Y.js map, can be changed to sync multiple fields with one Y.js document.
mapObjectnullA raw Y.js map, can be used instead of document and field.

Commands

CommandParametersDescription
addAnnotationdataAdds an annotation to the current selection, takes a string or an object.
updateAnnotationid, dataUpdate the data that’s associated with an annotation.
deleteAnnotationidRemove an annotation.

Source code

packages/extension-collaboration-annotation/

Usage