Trevixal API
    Preparing search index...

    Interface ViewActions

    interface ViewActions {
        activeSourceMode?: () => "html" | "markdown" | null;
        activeTheme?: () => string;
        activeWidth?: () => "normal" | "narrow" | "wide" | "full";
        copyCode?: (editor: Editor) => void;
        customCSS?: () => void;
        customizeToolbar?: () => void;
        customTheme?: () => void;
        formatPainter?: (editor: Editor) => void;
        insertEmoji?: (editor: Editor) => void;
        isSpellcheckEnabled?: () => boolean;
        isViewToggleOn?: (toggle: ViewToggle) => boolean;
        isWritingCheckEnabled?: (kind: WritingCheckKind) => boolean;
        manageFonts?: () => void;
        openCommandPalette?: (editor: Editor) => void;
        setTheme?: (theme: "light" | "dark" | "system") => void;
        setThemePreset?: (preset: string | null) => void;
        setWidth?: (width: "normal" | "narrow" | "wide" | "full") => void;
        setWritingGoal?: () => void;
        showAbout?: () => void;
        showKeyboardShortcuts?: () => void;
        showWritingStats?: () => void;
        toggleFocusMode?: () => void;
        toggleFullscreen?: () => void;
        toggleHistoryPanel?: () => void;
        toggleOutline?: () => void;
        togglePageMode?: () => void;
        toggleReadOnly?: () => void;
        toggleSourceMode?: (format: "html" | "markdown") => void;
        toggleSpellcheck?: () => void;
        toggleSplitEditor?: () => void;
        toggleSplitPreview?: () => void;
        toggleTableOfContents?: () => void;
        toggleTrackChanges?: () => void;
        toggleTypewriter?: () => void;
        toggleWorkspace?: () => void;
        toggleWritingAssistant?: () => void;
        toggleWritingCheck?: (kind: WritingCheckKind) => void;
    }
    Index
    activeSourceMode?: () => "html" | "markdown" | null

    The source format on show, or null while the rich surface is up.

    activeTheme?: () => string

    The theme now in force, as the name of its menu entry ('themeDark', 'themeNord'…). The theme entries behave as one radio group, so exactly one of them carries the tick.

    activeWidth?: () => "normal" | "narrow" | "wide" | "full"

    The width now in force, so the four width entries show which is chosen.

    copyCode?: (editor: Editor) => void
    customCSS?: () => void
    customizeToolbar?: () => void
    customTheme?: () => void
    formatPainter?: (editor: Editor) => void
    insertEmoji?: (editor: Editor) => void
    isSpellcheckEnabled?: () => boolean

    Whether spell checking is on, so its menu entry reports the state it toggles.

    isViewToggleOn?: (toggle: ViewToggle) => boolean

    Whether a piece of chrome is currently on, so its menu entry can show a tick. Without it every one of these entries looks the same whether it is on or off, and the menu stops being a place you can read the editor's state from. You have to toggle something to find out what it was.

    The host owns this chrome, so only the host can answer. Anything left unanswered simply renders as a plain command, exactly as before.

    isWritingCheckEnabled?: (kind: WritingCheckKind) => boolean

    Whether a check is on, so its menu entry shows a check mark.

    manageFonts?: () => void
    openCommandPalette?: (editor: Editor) => void
    setTheme?: (theme: "light" | "dark" | "system") => void
    setThemePreset?: (preset: string | null) => void

    Apply a named palette from createThemeController, or null for the plain one.

    setWidth?: (width: "normal" | "narrow" | "wide" | "full") => void
    setWritingGoal?: () => void
    showAbout?: () => void
    showKeyboardShortcuts?: () => void
    showWritingStats?: () => void
    toggleFocusMode?: () => void
    toggleFullscreen?: () => void
    toggleHistoryPanel?: () => void
    toggleOutline?: () => void
    togglePageMode?: () => void
    toggleReadOnly?: () => void
    toggleSourceMode?: (format: "html" | "markdown") => void

    Swap the rich surface for its Markdown or HTML source.

    toggleSpellcheck?: () => void
    toggleSplitEditor?: () => void

    A second live editor on the same document (the workspace's mirror mode).

    toggleSplitPreview?: () => void
    toggleTableOfContents?: () => void
    toggleTrackChanges?: () => void
    toggleTypewriter?: () => void
    toggleWorkspace?: () => void
    toggleWritingAssistant?: () => void
    toggleWritingCheck?: (kind: WritingCheckKind) => void

    Toggle one writing check; each gets its own entry under Tools ▸ Check writing.