Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents an indexer object which provides methods to help build backward relationship from DOM node to Content Model

Hierarchy

  • DomIndexer

Index

Properties

onParagraph

onParagraph: (paragraphElement: HTMLElement) => void

Type declaration

    • (paragraphElement: HTMLElement): void
    • Invoked when new paragraph node is created in DOM tree

      Parameters

      • paragraphElement: HTMLElement

        The new DOM node for this paragraph

      Returns void

onSegment

onSegment: (segmentNode: Node, paragraph: ContentModelParagraph, segments: ContentModelSegment[]) => void

Type declaration

onTable

onTable: (tableElement: HTMLTableElement, tableModel: ContentModelTable) => void

Type declaration

    • Invoked when new table node is created in DOM tree

      Parameters

      • tableElement: HTMLTableElement

        The new DOM node for this table

      • tableModel: ContentModelTable

      Returns void

reconcileSelection

reconcileSelection: (model: ContentModelDocument, newSelection: DOMSelection, oldSelection?: CacheSelection) => boolean

Type declaration

    • When document content or selection is changed by user, we need to use this function to update the content model to reflect the latest document. This process can fail since the selected node may not have a related model data structure.

      Parameters

      Returns boolean

      True if reconcile successfully, otherwise false

Generated using TypeDoc