Nutrient Web SDK
    Preparing search index...

    Interface AnnotationsFocusEvent

    This event is emitted whenever an annotation is focused. Selecting an annotation also focuses it.

    When an annotation is deselected by pressing the Escape key, successive annotations.blur and annotations.focus events will be dispatched for the same annotation.

    Use this event to add custom behavior like announcing the annotation value to screen readers.

    Log text annotation value

    instance.addEventListener("annotations.focus", (event) => {
    if (event.annotation instanceof Annotations.TextAnnotation) {
    console.log(event.annotation.text);
    }
    });
    interface AnnotationsFocusEvent {
        annotation: AnnotationsUnion;
        nativeEvent: FocusEvent;
    }
    Index

    Properties

    annotation: AnnotationsUnion

    The annotation that was focused.

    Remember that annotations are Immutable.map.

    nativeEvent: FocusEvent

    The browser event FocusEvent which caused the annotations.focus event to dispatch. Its type property is set to focus.