wdpr
    Preparing search index...

    Interface WikitextSettings

    Controls which parser and renderer features are active.

    These flags gate syntax availability and rendering behaviour based on the context where the wikitext appears. Construct via createSettings and override individual fields when non-default behaviour is needed.

    interface WikitextSettings {
        allowLocalPaths: boolean;
        allowStyleElements: boolean;
        enablePageSyntax: boolean;
        mode: WikitextMode;
        useTrueIds: boolean;
    }
    Index

    Properties

    allowLocalPaths: boolean

    Whether local file references (file1, file2, file3) are allowed in image sources.

    Local files belong to a specific wiki page. In contexts that lack a "current page" — such as forum posts and direct messages — local file references are meaningless and should be rejected.

    allowStyleElements: boolean

    Whether [[module CSS]] blocks are rendered as <style> tags.

    User-authored CSS can break page layout, so it is allowed only on full wiki pages. In draft previews, forum posts, and direct messages the CSS module is silently ignored.

    enablePageSyntax: boolean

    Whether page-contextual syntax is permitted.

    When true, the parser recognises [[include]], [[module]], and [[toc]] blocks. These constructs are meaningful only inside a full wiki page and are disabled in forum posts and direct messages.

    The context mode this settings object was created for

    useTrueIds: boolean

    Whether heading and footnote IDs use stable sequential values (toc0, toc1, ...) or randomised strings.

    Stable IDs are appropriate when a single rendered page owns the full document. Randomised IDs prevent collisions when multiple rendered fragments (e.g. a live draft preview) coexist on the same HTML page.