Function editorFromPlaceholder

  • Almost identical to createEditor, but instead of appending the editor to your element, the editor replaces it.

    The textContent of the placeholder will be the code in the editor unless options.value is defined.

    Parameters

    • placeholder: string | ChildNode

      Node or selector which will be replaced by the editor.

    • options: Partial<EditorOptions>

      Options the editor is initialized with.

    • 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