Edit and Create Annotations
3/27/26Less than 1 minute
Edit and Create Annotations
By default, edit and create annotations are disabled. You can enable them by on the AnotationAdapter when creating the AnnotatedText component.
import { createAnnotatedText } from "@ghentcdh/annotated-text";
createAnnotatedText(id)
.setAnnotationAdapter({ edit: true, create: true });Or you can enable/disable them on the fly using setConfig.
import { createAnnotatedText } from "@ghentcdh/annotated-text";
// Create the annotated text component with the ID
const textAnnotation = createAnnotatedText(id);
// Enable/or disable them on the fly using setAnnotationAdapter
textAnnotation.setAnnotationAdapter({ edit: true, create: true });