Expand all

ve.ui.MWLanguageVariantDisabledInspector

Extends

Constructor

new ve.ui.MWLanguageVariantDisabledInspector([config]) #

Parameters:

Name Type Attributes Description
config Object optional

Configuration options

Source:
Editor for "disabled" rules.

Properties

getContentFromInspector #

Convert the current inspector state to new content which can be used to update the ve.dm.SurfaceFragment backing this inspector.

Overrides:
Source:

Convert the current inspector state to new content which can be used to update the ve.dm.SurfaceFragment backing this inspector.

getDefaultVariantInfo #

Return a valid variantInfo object which will be used when a new node of this subclass is inserted. For instance, ve.ui.MWLanguageVariantDisabledInspector will return the appropriate object to use when the equivalent of wikitext -{}- is inserted in the document.

Overrides:
Source:

Return a valid variantInfo object which will be used when a new node of this subclass is inserted.

Methods

createTextTarget([placeholder]) → {ve.ui.TargetWidget} #

Helper function to create a subdocument editor for HTML embedded in the language variant node.

Parameters:

Name Type Attributes Description
placeholder string optional

Placeholder text for this editor.

Inherited from:
Source:

Returns:

Type
ve.ui.TargetWidget

Helper function to create a subdocument editor for HTML embedded in the language variant node.

getHtmlForDoc(doc) → {string} #

Helper function to serialize the document backing a ve.ui.TargetWidget back into HTML which can be embedded into the language variant node. This method needs to do a bit of hackery to remove unnecessary p-wrapping and (TODO) determine if an inline node needs to be converted to a block node or vice-versa.

Parameters:

Name Type Description
doc ve.dm.Document

The document backing an editor widget, as returned by ve.ui.MWLanguageVariantInspector#setupTextTargetDoc.

Inherited from:
Source:

Returns:

An HTML string appropriate for embedding into a language variant node.

Type
string

Helper function to serialize the document backing a ve.ui.TargetWidget back into HTML which can be embedded into the language variant node.

getSetupProcess([data]) → {OO.ui.Process} #

Handle the inspector being setup.

Parameters:

Name Type Attributes Description
data Object optional

Inspector opening data

Overrides:
Source:

Returns:

Type
OO.ui.Process
Handle the inspector being setup.

initialize() #

Handle frame ready events.

setupTextTargetDoc([textTarget], [htmlString]) → {ve.dm.Document} #

Helper function to initialize a ve.ui.TargetWidget with a given HTML string extracted from the language variant node.

Parameters:

Name Type Attributes Description
textTarget ve.ui.TargetWidget optional

A subdocument editor widget created by ve.ui.MWLanguageVariantInspector#createTextTarget.

htmlString string optional

The HTML string extracted from this node.

Inherited from:
Source:

Returns:

The document model now backing the widget.

Type
ve.dm.Document

Helper function to initialize a ve.ui.TargetWidget with a given HTML string extracted from the language variant node.