Skip to content

ReadOnlyCodeFolding

Defined in: extensions/folding/index.ts:22

readonly fullCode: string

Defined in: extensions/folding/index.ts:24

The code in the editor with no ranges collapsed.

toggleFold(lineNumber, force?): boolean

Defined in: extensions/folding/index.ts:35

Toggles whether a range is folded. Does not cause a rerender so it’s possible to toggle multiple folds simultaneously.

number

The line number of the fold.

boolean

If set to true, the range will only be folded. If false, the range will only be unfolded. If undefined, it will be toggled.

boolean

A boolean indicating whether or not a fold was toggled which means calling updateFolds in the near future is necessary.


update(editor, options): any

Defined in: types.ts:100

Function called when the extension is added or the options of the editor change.

PrismEditor<{ }>

EditorOptions & Omit<{ }, keyof EditorOptions>

any

Extension.update


updateFolds(): void

Defined in: extensions/folding/index.ts:37

Call this after the toggleFold method to rerender the editor.

void