wdpr
    Preparing search index...

    Interface RenderResolvers

    Async/sync resolver callbacks for content that depends on external data.

    Unlike the parser's DataProvider (which fetches bulk data for module expansion), these resolvers are called per-element during the rendering pass.

    interface RenderResolvers {
        htmlBlockUrl?: (index: number) => string;
        user?: (username: string) => ResolvedUser | null;
    }
    Index

    Properties

    Properties

    htmlBlockUrl?: (index: number) => string

    Build an iframe src URL for an [[html]] block.

    Type Declaration

      • (index: number): string
      • Parameters

        • index: number

          Zero-based index matching SyntaxTree["html-blocks"]

        Returns string

        The URL string. When empty or when the resolver is omitted, the default pattern /{pageName}/html/{hash}-{nonce} is used.

    The returned URL is injected directly into the iframe src attribute. The caller must validate the scheme to reject javascript:, data:, and other dangerous protocols.

    user?: (username: string) => ResolvedUser | null

    Look up a user profile by username.

    Type Declaration

      • (username: string): ResolvedUser | null
      • Parameters

        • username: string

          The raw username from [[user username]]

        Returns ResolvedUser | null

        Profile data for rendering, or null if the user is unknown. When null or when the resolver is omitted, the username is rendered as plain text.