Skip to content

renderEditor

renderEditor<T>(options): string

Defined in: ssr/index.ts:35

This function renders an editor as an HTML string. This is intended to the used with server-side rendering (SSR) or static-site generation (SSG). The editor can the later be made interactive on the client with the mountEditorsUnder function.

T extends object = { }

Omit<EditorOptions, "onUpdate" | "onSelectionChange" | "onTokenize"> & object & Omit<T, "tabSize" | "wordWrap" | "language" | "insertSpaces" | "lineNumbers" | "readOnly" | "value" | "rtl" | "class" | "tokenizeCallback" | "overlays">

Options used for the editor. Any properties you define are stringified to JSON, which will later be parsed by mountEditorsUnder. This is very useful if you want to add extra configuration options used to customize how the editor is mounted.

string