Class: EditBoxManager

Core. EditBoxManager

A manager class that controls freetext annotation contents editing.

new EditBoxManager(annotManager)

Parameters:
Name Type Description
annotManager Core.AnnotationManager The annotation manager instance

Extends

  • EventHandler

Methods


focusBox(annotation [, action])

Can be used to refocus the editor after changing annotation properties during editing
Parameters:
Name Type Argument Description
annotation Core.Annotations.FreeTextAnnotation The annotation to focus
action string <optional>
The action to perform when focusing

resizeAnnotation(annotation [, focusZoom] [, shouldRender])

Resizes an annotation based on the size of its editor
Parameters:
Name Type Argument Default Description
annotation Core.Annotations.FreeTextAnnotation The annotation to resize
focusZoom number <optional>
The zoom level in which to resize the annotation to. Defaults to the page zoom level the annotation is on
shouldRender boolean <optional>
true Whether to render the annotation after resizing

Type Definitions


Range

Type:
  • Object
Properties:
Name Type Description
index number the index of cursor
length number the number of characters that are selected

Events


editorBlur

Triggered after an editor blurred
Parameters:
Name Type Description
editor Core.Annotations.FreeTextAnnotation.RichTextEditor an instance of Editor
annotation Core.Annotations.FreeTextAnnotation a freetext annotation

editorFocus

Triggered after an editor is focused
Parameters:
Name Type Description
editor Core.Annotations.FreeTextAnnotation.RichTextEditor an instance of Editor
annotation Core.Annotations.FreeTextAnnotation a freetext annotation

editorSelectionChanged

Triggered after selection in the editor changed
Parameters:
Name Type Description
range Core.EditBoxManager.Range current selected range
oldRange Core.EditBoxManager.Range previous selected range

editorTextChanged

Triggered after some text in the editor changed