@umbraco-cms/backoffice
    Preparing search index...

    Hierarchy

    Index

    Constructors

    • Parameters

      Returns Editor

    Properties

    extensionManager: ExtensionManager
    extensionStorage: Storage
    instanceId: string

    A unique ID for this editor instance.

    isCapturingTransaction: boolean
    isFocused: boolean
    isInitialized: boolean

    The editor is considered initialized after the create event has been emitted.

    options: EditorOptions
    schema: Schema

    Accessors

    • get $doc(): NodePos

      Returns NodePos

    • get commands(): SingleCommands

      An object of all registered commands.

      Returns SingleCommands

    • get isDestroyed(): boolean

      Check if the editor is already destroyed.

      Returns boolean

    • get isEditable(): boolean

      Returns whether the editor is editable.

      Returns boolean

    • get isEmpty(): boolean

      Check if there is no content.

      Returns boolean

    • get state(): EditorState

      Returns the editor state.

      Returns EditorState

    • get storage(): Storage

      Returns the editor storage.

      Returns Storage

    • get view(): EditorView

      Returns the editor state.

      Returns EditorView

    Methods

    • Parameters

      • selector: string
      • Optionalattributes: { [key: string]: any }

      Returns null | NodePos

    • Parameters

      • selector: string
      • Optionalattributes: { [key: string]: any }

      Returns null | NodePos[]

    • Parameters

      • pos: number

      Returns NodePos

    • Check if a command or a command chain can be executed. Without executing it.

      Returns CanCommands

    • Parameters

      • fn: () => void

      Returns null | Transaction

    • Create a command chain to call multiple commands at once.

      Returns ChainedCommands

    • Creates all node and mark views.

      Returns void

    • Destroy the editor.

      Returns void

    • Get attributes of the currently selected node or mark.

      Parameters

      • nameOrType: string | NodeType | MarkType

      Returns Record<string, any>

    • Get the document as HTML.

      Returns string

    • Get the document as JSON.

      Returns DocumentType<
          undefined
          | Record<string, any>,
          NodeType<
              string,
              undefined
              | Record<string, any>,
              any,
              (NodeType<any, any, any, any> | TextType<MarkType<any, any>>)[],
          >[],
      >

    • Get the document as text.

      Parameters

      • Optionaloptions: { blockSeparator?: string; textSerializers?: Record<string, TextSerializer> }

      Returns string

    • Returns if the currently selected node or mark is active.

      Parameters

      • name: string

        Name of the node or mark

      • Optionalattributes: {}

        Attributes of the node or mark

      Returns boolean

    • Returns if the currently selected node or mark is active.

      Parameters

      • attributes: {}

        Attributes of the node or mark

      Returns boolean

    • Attach the editor to the DOM, creating a new editor view.

      Parameters

      • el: Element | { mount: HTMLElement } | ((editor: HTMLElement) => void)

      Returns void

    • Prepend class name to element.

      Returns void

    • Register a ProseMirror plugin.

      Parameters

      • plugin: Plugin

        A ProseMirror plugin

      • OptionalhandlePlugins: (newPlugin: Plugin, plugins: Plugin<any>[]) => Plugin<any>[]

        Control how to merge the plugin into the existing plugins.

      Returns EditorState

      The new editor state

    • Returns void

    • Update editable state of the editor.

      Parameters

      • editable: boolean
      • OptionalemitUpdate: boolean

      Returns void

    • Update editor options.

      Parameters

      Returns void

    • Remove the editor from the DOM, but still allow remounting at a different point in time

      Returns void

    • Unregister a ProseMirror plugin.

      Parameters

      • nameOrPluginKeyToRemove: string | PluginKey<any> | (string | PluginKey<any>)[]

        The plugins name

      Returns undefined | EditorState

      The new editor state or undefined if the editor is destroyed