Trevixal API
    Preparing search index...

    Function editorSnapshotSignal

    • A signal that tracks an editor's snapshot.

      Editor.subscribe is the same useSyncExternalStore contract React, Vue and Svelte all sit on, and the snapshot it hands back is reference-stable, so the signal changes when the state a toolbar shows changes, and not on every keystroke.

      Returns the signal and an unsubscribe; use createAngularEditor if you want the lifecycle handled for you.

      Parameters

      • editor: Editor

      Returns { snapshot: Signal<EditorSnapshot | null>; unsubscribe: () => void }