Options
All
  • Public
  • Public/Protected
  • All
Menu

A tree containing the modes configured for the current editing session.

Hierarchy

  • ModeTree

Implements

  • ModeTreeAPI

Index

Constructors

constructor

  • Parameters

    • editor: Editor

      The editor for which we are building this tree.

    • option: ModeOption

      The mode option from the options passed to the wed instance. This object will construct a tree from this option.

    Returns ModeTree

Properties

Private cachedMaxLabelNode

cachedMaxLabelNode: ModeNode | undefined

Private editor

editor: Editor

The editor for which we are building this tree.

Private loader

loader: ModeLoader

Private option

option: ModeOption

The mode option from the options passed to the wed instance. This object will construct a tree from this option.

Private root

root: ModeNode

Accessors

Private maxLabelLevelNode

  • The node with the maximum label visibility level. If multiple nodes have the same value, the earlier node "wins", and is the one provided by this property. For instance, if the root node and its submode have the same number, then this property has the root node for value.

    This is a cached value, computed on first access.

    Returns ModeNode

Methods

Private _getModeNode

  • _getModeNode(parent: ModeNode, parentScope: Element, node: Node): ModeNode | undefined

addDecoratorHandlers

  • addDecoratorHandlers(): void

getAttributeHandling

  • getAttributeHandling(node: Node): "show" | "hide" | "edit"

getAttributeHidingSpecs

getDecorator

getInitialLabelLevel

  • getInitialLabelLevel(): number

getMaxLabelLevel

  • getMaxLabelLevel(): number

getMode

  • getMode(node: Node): Mode

Private getModeNode

  • Get the mode node that governs a node.

    Parameters

    • node: Node

    Returns ModeNode

    The mode that governs the node.

getStylesheets

  • getStylesheets(): string[]

getValidators

getWedOptions

init

  • Load the modes, initialize them and build the tree.

    Returns Promise<ModeTree>

    A promise that resolves to this once all the modes are loaded and initialized.

Private makeNodes

  • Make the nodes of the tree. This function operates recursively: it will inspect option for a submode option and will call itself to create the necessary child nodes.

    Parameters

    • selector: string

      The selector associated with the options passed in the 2nd argument.

    • option: ModeOption

      The mode option being processed.

    • errorHandler: WedOptionsErrorCallback

    Returns Promise<ModeNode>

    A promise that resolves to the created node.

startListening

  • startListening(): void

Generated using TypeDoc