Trevixal API
    Preparing search index...

    Interface AngularEditor

    interface AngularEditor {
        editor: Editor;
        snapshot: Signal<EditorSnapshot | null>;
        attach(host: HTMLElement, options?: EditorViewOptions): () => void;
        destroy(): void;
    }
    Index
    editor: Editor

    The engine. Everything in @trevixal/core is reachable through it.

    snapshot: Signal<EditorSnapshot | null>

    Toolbar state as a signal: active marks, block type, canUndo and the rest. Reading it in a template subscribes that template and nothing else.

    • Mount the editing surface into a host element, typically a viewChild in ngAfterViewInit, or an afterNextRender callback.

      Returns a disposer. Calling attach again replaces the view, so a host that re-renders its container does not end up with two.

      Parameters

      • host: HTMLElement
      • Optionaloptions: EditorViewOptions

      Returns () => void

    • Destroy the view and the editor. Wire it to DestroyRef.

      Returns void