Skip to content

RenderOptions

RenderOptions = Omit<EditorOptions, "onUpdate" | "onTokenize" | "onSelectionChange"> & object

Defined in: ssr/index.ts:8

optional overlays: (options) => string | undefined[]

Array of functions that render overlays. These functions are called in order with the render options for the editor. Any HTML returned is inserted inside the overlays element of the editor.

RenderOptions

string | undefined

optional tokenizeCallback(tokens, language): void

Callback that can be used to modify the tokens before they’re stringified to HTML. If you’re using an extension that modifies the tokens on the client, you should pass a function here that does the same modifications. If you don’t, mounting the editor becomes more expensive. If you’re adding rainbow brackets you can pass the rainbowBrackets function to this parameter.

TokenStream

string

void