Extends
Properties
blockTypestatic
#
Node type to use when the transclusion is a block
Properties:
Type | Description |
---|---|
string |
cellTypestatic
#
Node type to use when the transclusion is cellable
Properties:
Type | Description |
---|---|
string |
inlineTypestatic
#
Node type to use when the transclusion is inline
Properties:
Type | Description |
---|---|
string |
Methods
getPartsList() → {Array.<Object>}
#
Get a simplified description of the transclusion's parts.
Returns:
List of objects with either template or content properties
getWikitext() → {string}
#
Wrapper for static method, {@see ve.dm
.MWTransclusionNode.static.getWikitext} above.
Returns:
Wikitext
- Type
- string
ve.dm
.MWTransclusionNode.static.getWikitext} above.
isSingleTemplate([allowedTemplates]) → {boolean}
#
Check if transclusion contains only a single template.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
allowedTemplates |
string | Array.<string> |
optional |
Names of templates to allow, omit to allow any template name |
Returns:
Transclusion only contains a single template, which is one of the ones in templates
- Type
- boolean
onAttributeChange(key, from, to)
#
Handle attribute change events.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | Attribute key |
from |
string | Old value |
to |
string | New value |
cloneElement()static
#
escapeParameter(param) → {string}static
#
Escape a template parameter. Helper function for #getWikitext.
Parameters:
Name | Type | Description |
---|---|---|
param |
string | Parameter value |
Returns:
Escaped parameter value
- Type
- string
getWikitext(content) → {string}static
#
Recreate the wikitext for this transclusion, possibly containing multiple template invocations, mixed with raw wikitext snippets.
Parameters:
Name | Type | Description |
---|---|---|
content |
Object | MW data content |
Returns:
Wikitext
- Type
- string
Recreate the wikitext for this transclusion, possibly containing multiple template invocations, mixed with raw wikitext snippets.