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.
Type Parameters
Section titled “Type Parameters”T
extends object
= { }
Parameters
Section titled “Parameters”options
Section titled “options”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.
Returns
Section titled “Returns”string