interface Folding {
    foldWidgets: any[];
    getFoldWidget: any;
    getFoldWidgetRange: any;
    addFold(placeholder, range?): Fold;
    addFolds(folds): void;
    expandFold(fold): void;
    expandFolds(folds): void;
    foldAll(startRow?, endRow?, depth?, test?): void;
    foldAllComments(): void;
    foldToLevel(level): void;
    getAllFolds(): Fold[];
    getCommentFoldRange(row, column, dir?): Range;
    getDisplayLine(row, endColumn, startRow, startColumn): string;
    getFoldAt(row, column, side?): Fold;
    getFoldDisplayLine(foldLine, endRow?, endColumn?, startRow?, startColumn?): string;
    getFoldLine(docRow, startFoldLine?): FoldLine;
    getFoldStringAt(row, column, trim?, foldLine?): string;
    getFoldedRowCount(first, last): number;
    getFoldsInRange(range): Fold[];
    getFoldsInRangeList(ranges): Fold[];
    getNextFoldLine(docRow, startFoldLine?): FoldLine;
    getParentFoldRangeData(row, ignoreCurrent?): {
        firstRange?: Range;
        range?: Range;
    };
    getRowFoldEnd(docRow, startFoldRow?): number;
    getRowFoldStart(docRow, startFoldRow?): number;
    isRowFolded(docRow, startFoldRow?): boolean;
    onFoldWidgetClick(row, e): void;
    removeFold(fold): void;
    removeFolds(folds): void;
    setFoldStyle(style): void;
    toggleFold(tryToUnfold?): void;
    toggleFoldWidget(toggleParent?): void;
    tokenizerUpdateFoldWidgets(e): void;
    unfold(location?, expandInner?): Fold[];
    updateFoldWidgets(delta): void;
}

Properties

foldWidgets: any[]
getFoldWidget: any
getFoldWidgetRange: any

Methods

  • 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.

    Parameters

    • placeholder: string | Fold
    • Optional range: Range

    Returns Fold

  • Parameters

    • folds: Fold[]

    Returns void

  • Parameters

    • fold: Fold

    Returns void

  • Parameters

    • folds: Fold[]

    Returns void

  • Parameters

    • Optional startRow: number
    • Optional endRow: number
    • Optional depth: number
    • Optional test: Function

    Returns void

  • Parameters

    • level: number

    Returns void

  • Returns all folds in the document

    Returns Fold[]

  • Parameters

    • row: number
    • column: number
    • Optional dir: number

    Returns Range

  • Parameters

    • row: number
    • endColumn: number
    • startRow: number
    • startColumn: number

    Returns string

  • 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

    Parameters

    • row: number
    • column: number
    • Optional side: number

    Returns Fold

  • Parameters

    • foldLine: FoldLine
    • Optional endRow: number
    • Optional endColumn: number
    • Optional startRow: number
    • Optional startColumn: number

    Returns string

  • Parameters

    • docRow: number
    • Optional startFoldLine: FoldLine

    Returns FoldLine

  • 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"

    Parameters

    • row: number
    • column: number
    • Optional trim: number
    • Optional foldLine: FoldLine

    Returns string

  • Parameters

    • first: number
    • last: number

    Returns number

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

    Parameters

    Returns Fold[]

  • Returns the fold which starts after or contains docRow

    Parameters

    • docRow: number
    • Optional startFoldLine: FoldLine

    Returns FoldLine

  • Parameters

    • row: number
    • Optional ignoreCurrent: boolean

    Returns {
        firstRange?: Range;
        range?: Range;
    }

  • Parameters

    • docRow: number
    • Optional startFoldRow: FoldLine

    Returns number

  • Parameters

    • docRow: number
    • Optional startFoldRow: FoldLine

    Returns number

  • 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.

    Parameters

    • docRow: number
    • Optional startFoldRow: FoldLine

    Returns boolean

  • Parameters

    • row: number
    • e: any

    Returns void

  • Parameters

    • fold: Fold

    Returns void

  • Parameters

    • folds: Fold[]

    Returns void

  • Parameters

    • style: string

    Returns void

  • Parameters

    • Optional tryToUnfold: boolean

    Returns void

  • Parameters

    • Optional toggleParent: boolean

    Returns void

  • Parameters

    • e: any

    Returns void

  • Parameters

    Returns Fold[]

Generated using TypeDoc