@twip/web
    Preparing search index...

    Class Editor

    An editor mounted in a page: it owns input, rendering, scrolling and its DOM inside the container.

    Hierarchy (View Summary)

    Index
    accessibility: Accessibility

    The accessibility tree.

    catalog: readonly CommandInfo[]

    Every command's id, label, group, shortcuts and undo grouping.

    commands: Commands

    Every edit, one method per command.

    container: HTMLElement

    The element the editor was mounted in.

    data: DataParts

    The custom XML data parts.

    dialogs: Dialogs

    The dialogs.

    elements: MountedElements

    Elements, with drop targets and hit testing.

    executionMode: "main" | "worker"

    Where the engine runs.

    find: Find

    Find and replace.

    gestures: Gestures

    The pointer gestures.

    lists: Lists

    The list galleries, and the characters of fonts for a symbol picker.

    menus: Menus

    The context menu.

    navigation: Navigation

    The document's headings.

    Review, with the markup pane and balloons.

    ruler: Ruler

    The rulers: the model, the built-in rulers and the viewport mapping.

    shapeGallery: readonly ShapeGalleryGroup[]

    Word's Insert > Shapes gallery: its groups and their presets, in order.

    shortcuts: Shortcuts

    Keyboard shortcuts.

    spelling: Spelling

    Spell checking.

    styles: Styles

    The document's styles.

    subTemplates: SubTemplates

    The template's sub-templates, and editing one in this editor.

    view: View

    The view.

    • Runs several commands atomically: one transaction and one undo step, or nothing when one fails.

      Parameters

      • ops: readonly Op[]
      • Optionaloptions: { label?: string }

      Returns Promise<void>

    • Focuses the editor, keeping the selection. Mounting never takes focus by itself.

      Returns void

    • Replaces the document, only after it was read successfully. Resolves with the read's warnings once the new document's first frame is drawn (at once while the editor has no size or the page is hidden): until then the editor shows the old document, so an application can show a loading indicator for as long as this runs. Rejects with destroyed when the editor is destroyed first.

      Parameters

      • bytes: Uint8Array
      • Optionaloptions: { signal?: AbortSignal }

      Returns Promise<{ warnings: Warning[] }>