Constructors

Properties

addFold: (placeholder: string | Fold, range?: Range) => Fold

Adds a new fold.

 The new created Fold object or an existing fold object in case the
 passed in range fits an existing fold exactly.
addFolds: (folds: Fold[]) => void
expandFold: (fold: Fold) => void
expandFolds: (folds: Fold[]) => void
foldAll: (
    startRow?: number,
    endRow?: number,
    depth?: number,
    test?: Function,
) => void
foldAllComments: () => void
foldToLevel: (level: number) => void
getAllFolds: () => Fold[]

Returns all folds in the document

getCommentFoldRange: (row: number, column: number, dir?: number) => Range
getDisplayLine: (
    row: number,
    endColumn: number,
    startRow: number,
    startColumn: number,
) => string
getFoldAt: (row: number, column: number, side?: number) => Fold

Looks up a fold at a given row/column. Possible values for side: -1: ignore a fold if fold.start = row/column +1: ignore a fold if fold.end = row/column

getFoldDisplayLine: (
    foldLine: FoldLine,
    endRow?: number,
    endColumn?: number,
    startRow?: number,
    startColumn?: number,
) => string
getFoldedRowCount: (first: number, last: number) => number
getFoldLine: (docRow: number, startFoldLine?: FoldLine) => FoldLine
getFoldsInRange: (range: Delta | Range) => Fold[]

Returns all folds in the given range. Note, that this will return folds

getFoldsInRangeList: (ranges: Range | Range[]) => Fold[]
getFoldStringAt: (
    row: number,
    column: number,
    trim?: number,
    foldLine?: FoldLine,
) => string

Returns the string between folds at the given position. E.g. foob|arwolrd -> "bar" foobarwol|rd -> "world" foobar<fo|ld>wolrd ->

where | means the position of row/column

The trim option determs if the return string should be trimed according to the "side" passed with the trim value:

E.g. foob|arwolrd -trim=-1> "b" foobarwol|rd -trim=+1> "rld" fo|obarwolrd -trim=00> "foo"

getNextFoldLine: (docRow: number, startFoldLine?: FoldLine) => FoldLine

Returns the fold which starts after or contains docRow

getParentFoldRangeData: (
    row: number,
    ignoreCurrent?: boolean,
) => { firstRange?: Range; range?: Range }
getRowFoldEnd: (docRow: number, startFoldRow?: FoldLine) => number
getRowFoldStart: (docRow: number, startFoldRow?: FoldLine) => number
isRowFolded: (docRow: number, startFoldRow?: FoldLine) => boolean

Checks if a given documentRow is folded. This is true if there are some folded parts such that some parts of the line is still visible.

onFoldWidgetClick: (row: number, e: any) => void
removeFold: (fold: Fold) => void
removeFolds: (folds: Fold[]) => void
setFoldStyle: (style: string) => void
toggleFold: (tryToUnfold?: boolean) => void
toggleFoldWidget: (toggleParent?: boolean) => void
tokenizerUpdateFoldWidgets: (e: any) => void
unfold: (
    location?: number | Point | Range | Range[],
    expandInner?: boolean,
) => Fold[]
updateFoldWidgets: (delta: Delta) => void