Options
All
  • Public
  • Public/Protected
  • All
Menu

Represent a chain of list nodes. A chain of lists is a virtual link of lists that have continuous numbers, when editor one of them, all others should also be updated in order to main the list number to be continuous.

Hierarchy

  • VListChain

Index

Methods

canAppendAtCursor

  • canAppendAtCursor(startNumber: number): boolean
  • Check if a list with the given start number can be appended next to the last list before cursor

    Parameters

    • startNumber: number

      The start number of the new list

    Returns boolean

commit

  • commit(shouldReuseAllAncestorListElements?: boolean, disableListChain?: boolean): void
  • After change the lists, commit the change to all lists in this chain to update the list number, and clear the temporary dataset values added to list node

    Parameters

    • Optional shouldReuseAllAncestorListElements: boolean

      Whether we can parent list item (OL/UL) even if its list type does not match the previous one. @default false

    • Optional disableListChain: boolean

      Whether we want to disable list chain functionality, so splitted list will always restart its number from 1 @default false

    Returns void

createVListAtBlock

  • createVListAtBlock(container: Node, startNumber: number): VList
  • Create a VList to wrap the block of the given node, and append to current chain

    Parameters

    • container: Node

      The container node to create list at

    • startNumber: number

      Start number of the new list

    Returns VList

Static createListChains

  • Create an array of VListChain from current region in editor

    Parameters

    • region: RegionBase | RegionBase[]

      The region to create VListChain from

    • Optional currentNode: Node

      Optional current node, used for mark lists that are after this node

    • Optional nameGenerator: () => string

      Used by test code only

        • (): string
        • Returns string

    Returns VListChain[]

Generated using TypeDoc