Interface ParsoidTransclusionTemplateInterface

Hierarchy

  • ParsoidTransclusionTemplateInterface

Properties

Properties

i: number

For unbalanced wikitext, where multiple templates form a single element (such as {{collapse top}} and {{collapse bottom}}) wrapping text with separate <div> tags found in both templates. Since Parsoid is only able to attach attributes to a single element, it cannot attach metadata on an element that spans multiple transclusions. In such a case, an i will be provided. This is the template node's index in the block of content. For the most part, you wouldn't need to touch this, as ParsoidDocument will automatically save to the correct index.

params: Record<string, {
    wt: string;
}>

Parameters to the transclusion. All members of this object are objects that have a wt (wikitext) parameter, indicating the wikitext provided in the transclusion parameters.

Type declaration

  • wt: string
target: {
    href?: string;
    wt: string;
}

The target of the transclusion. This is, in most cases, a template.

Type declaration

  • Optional href?: string

    A URI to the template being transcluded. If generating a template or modifying the target, this can be omitted.

    Example

    "./Template:Copied"
    
  • wt: string

    The wikitext of the transclusion. For block type transclusions, this will include the newline at the end of the string.

    Example

    "copied"
    

Generated using TypeDoc