typograph-editor-documentation
    Preparing search index...

    Interface viewer_options

    interface viewer_options {
        container?: string | HTMLElement;
        host?: HostProviders;
        legacy_php_fallback?: boolean;
        locale?: string;
        page_bar?: page_bar_options;
        show_rulers?: boolean;
    }
    Index
    container?: string | HTMLElement

    Where the viewer is built. Defaults to document.body.

    host?: HostProviders

    The host's providers, as for Typograph.Editor (TYP-697). Pass them here, never with a typograph.setup() call of your own: the viewer calls setup() itself, and a second call replaces its document.

    legacy_php_fallback?: boolean

    false turns every PHP fallback off; only providers from host are used.

    locale?: string

    The language of the viewer's own texts, as for Typograph.Editor (TYP-1287): 'en' or 'nl'. Omitted, data-typograph-locale on decides, and without it English.

    page_bar?: page_bar_options

    Page bar controls. Omitted keys keep canvas's own defaults.

    show_rulers?: boolean

    Show the rulers. Default true — they are part of what canvas's viewer mode has always shown, and the implementer decides whether their product wants them.