Options
All
  • Public
  • Public/Protected
  • All
Menu

Data provider for PickerPlugin

Hierarchy

  • PickerDataProvider

Index

Properties

Optional getSelectedIndex

getSelectedIndex: () => number

Type declaration

    • (): number
    • Function that returns the index of the option currently selected in the picker.

      Returns number

Optional onContentChanged

onContentChanged: (elementIds: string[]) => void

Type declaration

    • (elementIds: string[]): void
    • Function that is called when the plugin detects the editor's content has changed. Provides a list of current picker placed elements in the document.

      Parameters

      • elementIds: string[]

      Returns void

onDispose

onDispose: () => void

Type declaration

    • (): void
    • Function called when the plugin is disposed for the data provider to do any cleanup.

      Returns void

onInitalize

onInitalize: (insertNodeCallback: (nodeToInsert: HTMLElement) => void, setIsSuggestingCallback: (isSuggesting: boolean) => void, editor?: IEditor) => void

Type declaration

    • (insertNodeCallback: (nodeToInsert: HTMLElement) => void, setIsSuggestingCallback: (isSuggesting: boolean) => void, editor?: IEditor): void
    • Function called when the plugin is initialized to register two callbacks with the data provider and to provide a reference to the Editor. The first callback, insertNodeCallback, may be called in order to "commit" a new element to the editor body that isn't handled automatically by the editor plugin. The second callback, setIsSuggestingCallback, sets the isSuggesting value in the plugin. The isSuggesting value determines whether the picker is shown (true) or hidden (false). In most cases, this value is managed by the plugin, but the setIsSuggestingCallback may be used for situations where the UX needs to manipulate the suggesting state on its own.

      Parameters

      • insertNodeCallback: (nodeToInsert: HTMLElement) => void
          • (nodeToInsert: HTMLElement): void
          • Parameters

            • nodeToInsert: HTMLElement

            Returns void

      • setIsSuggestingCallback: (isSuggesting: boolean) => void
          • (isSuggesting: boolean): void
          • Parameters

            • isSuggesting: boolean

            Returns void

      • Optional editor: IEditor

      Returns void

onIsSuggestingChanged

onIsSuggestingChanged: (isSuggesting: boolean) => void

Type declaration

    • (isSuggesting: boolean): void
    • Function called when the picker changes suggesting state (isSuggesting - true: Plugin is being shown; false: Plugin is being hidden).

      Parameters

      • isSuggesting: boolean

      Returns void

onRemove

onRemove: (nodeRemoved: Node, isBackwards: boolean) => Node

Type declaration

    • (nodeRemoved: Node, isBackwards: boolean): Node
    • Function that is called when a delete command is issued. Returns the intended replacement node (if partial delete) or null (if full delete)

      Parameters

      • nodeRemoved: Node
      • isBackwards: boolean

      Returns Node

Optional onScroll

onScroll: (scrollContainer: HTMLElement) => void

Type declaration

    • (scrollContainer: HTMLElement): void
    • Handler of scroll event from scroll container of editor

      Parameters

      • scrollContainer: HTMLElement

      Returns void

queryStringUpdated

queryStringUpdated: (queryString: string, isExactMatch: boolean) => void

Type declaration

    • (queryString: string, isExactMatch: boolean): void
    • Function called when the query string (text after the trigger symbol) is updated.

      Parameters

      • queryString: string
      • isExactMatch: boolean

      Returns void

Optional selectOption

selectOption: () => void

Type declaration

    • (): void
    • Function called when a keypress is issued that would "select" a currently highlighted option.

      Returns void

Optional setCursorPoint

setCursorPoint: (targetPoint: { x: number; y: number }, buffer: number) => void

Type declaration

    • (targetPoint: { x: number; y: number }, buffer: number): void
    • Function that is called by the plugin to set the current cursor position as an anchor point for where to show UX.

      Parameters

      • targetPoint: { x: number; y: number }
        • x: number
        • y: number
      • buffer: number

      Returns void

Optional shiftHighlight

shiftHighlight: (isIncrement: boolean) => void

Type declaration

    • (isIncrement: boolean): void
    • Function called when a keypress is issued that would move the highlight on any picker UX.

      Parameters

      • isIncrement: boolean

      Returns void

Generated using TypeDoc