Options
All
  • Public
  • Public/Protected
  • All
Menu

The class that helps search content around a position

Hierarchy

  • IPositionContentSearcher

Implemented by

Index

Methods

forEachTextInlineElement

  • forEachTextInlineElement(callback: (textInlineElement: InlineElement) => any): void
  • Get text section before position till stop condition is met. This offers consumers to retrieve text section by section The section essentially is just an inline element which has Container element so that the consumer can remember it for anchoring popup or verification purpose when position moves out of context etc.

    Parameters

    Returns void

getInlineElementAfter

getInlineElementBefore

getNearestNonTextInlineElement

getRangeFromText

  • getRangeFromText(text: string, exactMatch: boolean): Range

getSubStringBefore

  • getSubStringBefore(length: number): string
  • Get X number of chars before position The actual returned chars may be less than what is requested.

    Parameters

    • length: number

      The length of string user want to get, the string always ends at the position, so this length determines the start position of the string

    Returns string

    The actual string we get as a sub string, or the whole string before position when there is not enough chars in the string

getWordBefore

  • getWordBefore(): string

Generated using TypeDoc