typograph-editor-documentation
    Preparing search index...

    Class EditorUI

    Index
    • Apply content-bar tab config. Called on init and whenever apply() fires.

      Returns void

    • Apply config for data-pb-component wrappers inside a parameter-bar panel.

      Parameters

      • prefix: string

        Key prefix, e.g. 'parameterbar.position_size' or 'parameterbar.page.bleed'

      • root: HTMLElement | Document = document

        Root element to search inside (defaults to document)

      Returns void

    • Apply toolbar config after every set_active_object() rebuild.

      Parameters

      • container: HTMLElement

        The #tools HTMLElement

      Returns void

    • Re-apply config to all currently-live DOM (content bar + registered pb panels). Toolbar is re-applied automatically on every set_active_object() rebuild.

      Returns void

    • Parameters

      • fn: () => void

      Returns void

    • Whether pins are on screen right now, mode included — not the raw toggle.

      Returns boolean

    • Parameters

      • key: string
      • Optionaloptions: HideOptions

      Returns this

    • Parameters

      • key: string

      Returns boolean

    • Parameters

      • key: string

      Returns boolean

    • Re-read the host's comments, for when the host knows something changed elsewhere.

      Returns this

    • Register the live root element for a parameter-bar panel so that hide()/show()/disable()/enable() calls update it immediately. Call this every time the panel rebuilds its DOM.

      Parameters

      • prefix: string
      • root: HTMLElement

      Returns void

    • False when the host said it will draw the mode control itself.

      Returns boolean

    • Open a thread by id, for a host landing a reader on the comment a notification named.

      Parameters

      • id: string

      Returns this

    • Which modes this host offers. Defaults to ['editing'], so an embedder that knows nothing about commenting sees no switcher and no change in behaviour.

      A commenter is given ['commenting'] alone and a read-only reader ['viewing']: the switcher then renders as a locked label rather than a menu, which is what tells them on screen why the tools are inert.

      Parameters

      • modes: editor_mode[]
      • options: { render?: boolean } = {}

      Returns this

    • Show the pins while editing. Ignored in the other modes: commenting always draws them — it is the mode for placing them — and viewing never does.

      Parameters

      • visible: boolean

      Returns this

    • Register the host's comment backend. The widget never fetches anything itself: it holds no URL and no token, and that is deliberate (see CLAUDE.md, TYP-583).

      Parameters

      • source: comment_source

      Returns this

    • Open or close the thread rail. It starts closed: pins are the ambient signal that a page carries feedback, and 320px of canvas is too much to spend before anyone asks for it.

      Parameters

      • open: boolean

      Returns this

    • Who is looking. Decides which comments offer edit and delete.

      Parameters

      • user: comment_user

      Returns this

    • Set the keyword list available for insertion via Cmd+K in rich text mode. REPLACES the entire existing list (including the CAM/Spronk defaults) — it does not merge. Keywords are sorted alphabetically. Pass [] to disable the popup.

      Parameters

      • keywords: string[]

      Returns this

    • Commenting and viewing mute canvas interaction through the switch TYP-597 added, and hide the authoring controls through the same keys a host would use. Neither is a new enforcement mechanism, and neither is a security boundary — the host still enforces permission server-side.

      Parameters

      • mode: editor_mode

      Returns this

    • Controls how the Save command serialises spreads: 'spreads' (default, as authored) or 'single_pages' (each spread split into single pages). Does not mutate the document — only the serialised output is affected.

      Parameters

      Returns this