@twip/web
    Preparing search index...

    Interface View

    The view of a mounted editor. Zoom and the other view settings are the view commands.

    interface View {
        frameStats(): Promise<FrameStats>;
        revealSelection(): Promise<void>;
        setAppearance(appearance: DocumentAppearance): Promise<void>;
        setBackground(color: `#${string}` | null): Promise<void>;
        setCaretBlink(ms: number, stopAfterMs?: number): Promise<void>;
        setDetail(detail: MeasureDetail): Promise<void>;
        setOverlayColors(colors: Partial<OverlayColors> | null): Promise<void>;
        setTheme(theme: ChromeTheme, accent?: `#${string}`): Promise<void>;
        setThemeColors(colors: ThemeColors): Promise<void>;
        visiblePages(): { page: number; rect: ClientRect }[];
    }
    Index
    • How the page is drawn on screen: in the document's colours, dark, or dark chrome around a page in its own colours. Saving, export and printing always use the document's colours. Under forced colours the page stays light until the mode ends. setViewOptions with appearance.

      Parameters

      Returns Promise<void>

    • The background around the pages, instead of the theme's desk colour. The page shadow and the markup pane follow it. Until the application sets a theme, a dark background also gives the dark theme. null puts back the theme's.

      Parameters

      • color: `#${string}` | null

      Returns Promise<void>

    • How the caret blinks: ms per phase (0 for a steady caret), and stop blinking, the caret left visible, after stopAfterMs without input. The editor stops following the platform's reduced-motion setting.

      Parameters

      • ms: number
      • OptionalstopAfterMs: number

      Returns Promise<void>

    • The colours of what the editor draws over the document; the ones not given keep theirs. The editor stops following the platform's forced-colours mode. null puts back the theme's, which follow it again.

      Parameters

      Returns Promise<void>

    • The chrome's colour scheme (the desk, rulers, handles, guides and readouts), and its accent when given. Under the platform's forced-colours mode the editor keeps the high-contrast scheme and applies this once the mode ends. setViewOptions with theme and accent.

      Parameters

      Returns Promise<void>

    • The application's colours for the light and dark schemes, to match its own UI: each scheme given replaces the last one set for it, and {} puts its own colours back. setViewOptions with themeColors.

      Parameters

      Returns Promise<void>