• Creates a code editor using the specified container and options.

    Parameters

    • Optional container: null | string | ParentNode

      Element to append the editor to or a selector. This can also be a ShadowRoot or DocumentFragment for example. If omitted, you must manually append the scrollContainer to the DOM.

    • Optional options: Partial<EditorOptions>

      Options the editor is initialized with. If omitted, the editor won't function until you call setOptions.

    • Rest ...extensions: EditorExtension[]

      Extensions added before the first render. You can still add extensions later.

    Returns PrismEditor

    Object to interact with the created editor.

Generated using TypeDoc