Expand all

ve.dm.MWTransclusionContentModel

Extends

Constructor

new ve.dm.MWTransclusionContentModel(transclusion, [wikitext]) #

Represents a raw wikitext snippet that is part of an unbalanced sequence of template invocations. Meant to be an item in a ve.dm.MWTransclusionModel. Holds a back-reference to it's parent.

Parameters:

Name Type Attributes Default Description
transclusion ve.dm.MWTransclusionModel
wikitext string optional
''
Source:
Represents a raw wikitext snippet that is part of an unbalanced sequence of template invocations.

Methods

containsValuableData() → {boolean} #

Returns:

True if there is meaningful user input that was not e.g. auto-generated

Type
boolean
Overrides:
Source:

getId() → {string} #

Get a unique part ID within the transclusion.

Returns:

Unique ID

Type
string
Inherited from:
Source:
Get a unique part ID within the transclusion.

getTransclusion() → {ve.dm.MWTransclusionModel} #

Get transclusion part is in.

remove() #

Remove part from transclusion.

serialize() → {Object|string|undefined} #

Create a serialized representation of this part. Contains all information needed to recreate the original wikitext, including extra whitespace. Used in ve.dm.MWTransclusionModel#getPlainObject. The corresponding deserializer is in ve.dm.MWTransclusionNode.static.getWikitext.

Returns:

Serialized representation, raw wikitext, or undefined if empty

Type
Object | string | undefined
Overrides:
Source:
Create a serialized representation of this part.

setWikitext(wikitext) #

Events

change() #

Emitted when the wikitext changed.