@wdprlib/render
    Preparing search index...

    Interface RenderWikitextOptions<TPage>

    interface RenderWikitextOptions<TPage extends WikitextPageContext> {
        baseUrl?: string;
        embedAllowlist?: EmbedAllowlistEntry[] | null;
        htmlBlockSandbox?: string | null;
        resolvers?: RenderWikitextResolvers<TPage>;
        styleMode?: "inline" | "separate";
    }

    Type Parameters

    • TPage extends WikitextPageContext

    Hierarchy

    • Omit<RenderOptions, "settings" | "page" | "footnotes" | "resolvers">
      • RenderWikitextOptions
    Index

    Properties

    baseUrl?: string

    Base URL for resolving protocol-relative URLs (e.g. "//example.com/path").

    The scheme of this URL (http: or https:) is prepended to protocol-relative references. When omitted, HTTPS is assumed.

    "https://scp-wiki.wikidot.com"
    
    embedAllowlist?: EmbedAllowlistEntry[] | null

    Allowlist for [[embed]] content with host and optional path validation.

    • undefined: Uses default allowlist (YouTube, Vimeo, etc. with path restrictions)
    • EmbedAllowlistEntry[]: Custom allowlist with host patterns and optional path prefixes
    • []: Block all embeds
    • null: Allow any HTTPS iframe (Wikidot's 'anyiframe' behavior)
    htmlBlockSandbox?: string | null

    Sandbox attribute value for htmlBlock iframes.

    • undefined: Empty sandbox attribute (all sandbox restrictions enabled)
    • null: No sandbox attribute (explicit compatibility opt-out; scripts can run)
    • string: Use as sandbox attribute value (e.g., "allow-scripts allow-same-origin")

    Examples:

    • No sandbox (Wikidot compatible): htmlBlockSandbox: null
    • Block scripts: htmlBlockSandbox: "allow-same-origin"
    • Allow scripts: htmlBlockSandbox: "allow-scripts allow-same-origin"

    Combining allow-scripts and allow-same-origin for same-origin content can let the embedded document remove its own sandbox attribute.

    styleMode?: "inline" | "separate"