Hi there,
You would need to trigger a modify action for the annotation, so doing something like the following can work:
const createInnerElement = Annotations.TextWidgetAnnotation.prototype.createInnerElement;
Annotations.TextWidgetAnnotation.prototype.createInnerElement = function () {
const textField = this;
const el = createInnerElement.apply(this, arguments);
el.addEventListener('input', async (e) => {
const textFieldAnnot = textField.getField();
textFieldAnnot.value = textField.value;
console.log(await annotationManager.exportAnnotationCommand())
});
return el;
};
Best regards,
Kevin Kim