Edit and Create Annotations
8/28/25Less 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,
{
annotation: { edit: true, create: true },
})
Or you can enable/disable them on the fly by.
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
textAnnotation.annotationAdapter.enableEdit(true);
textAnnotation.annotationAdapter.enableCreate(true);
Example
Contributors
Bo Vandersteene