RenderOptions
RenderOptions =
Omit<EditorOptions,"onUpdate"|"onTokenize"|"onSelectionChange"> &object
Defined in: ssr/index.ts:8
Type declaration
Section titled “Type declaration”overlays?
Section titled “overlays?”
optionaloverlays: (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.
Parameters
Section titled “Parameters”options
Section titled “options”RenderOptions
Returns
Section titled “Returns”string | undefined
tokenizeCallback()?
Section titled “tokenizeCallback()?”
optionaltokenizeCallback(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.
Parameters
Section titled “Parameters”tokens
Section titled “tokens”language
Section titled “language”string
Returns
Section titled “Returns”void