Expand all

abstract ve.ui.MWExtensionWindow

Constructor

new ve.ui.MWExtensionWindow([config])abstract #

Mixin for windows for editing generic MediaWiki extensions.

Parameters:

Name Type Attributes Description
config Object optional

Configuration options

Source:
Mixin for windows for editing generic MediaWiki extensions.

Properties

isModified #

Deprecated:
  • Moved to ve.ui.MWExtensionWindow.prototype.isSaveable
Source:

allowedEmptystatic #

Extension is allowed to have empty contents

Properties:

Type Description
boolean
Source:
Extension is allowed to have empty contents

dirstatic #

Inspector's directionality, 'ltr' or 'rtl'

Leave as null to use the directionality of the current fragment.

Properties:

Type Description
string | null
Source:

Inspector's directionality, 'ltr' or 'rtl'

Leave as null to use the directionality of the current fragment.

selfCloseEmptyBodystatic #

Tell Parsoid to self-close tags when the body is empty

i.e. <foo></foo> -> <foo/>

Properties:

Type Description
boolean
Source:

Tell Parsoid to self-close tags when the body is empty

i.e.

Methods

getActionProcess() #

getInputPlaceholder() → {string} #

Get the placeholder text for the content input area.

Source:

Returns:

Placeholder text

Type
string
Get the placeholder text for the content input area.

getNewElement() → {Object} #

Create an new data element for the model class associated with this inspector

Source:

Returns:

Element data

Type
Object
Create an new data element for the model class associated with this inspector

getReadyProcess() #

getSetupProcess() #

getTeardownProcess() #

hasMeaningfulEdits() → {boolean} #

Check if mwData has meaningful edits. This is used to determine if it's meaningful to warn the user before closing the dialog without saving. Unlike isModified() above, we consider a newly-created but unmodified element to be non-meaningful because the user can simply re-open the dialog to restore their state.

Source:

Returns:

mwData would contain new user input

Type
boolean
Check if mwData has meaningful edits.

insertOrUpdateNode() #

Insert or update the node in the document model from the new values

Source:
Insert or update the node in the document model from the new values

isSaveable() → {boolean} #

Check if mwData would be modified if window contents were applied. This is used to determine if it's meaningful for the user to save the contents into the document; this is likely true of newly-created elements.

Source:

Returns:

mwData would be modified

Type
boolean
Check if mwData would be modified if window contents were applied.

onChange() #

Handle change event.

Source:
Handle change event.

removeNode() #

Remove the node form the document model

Source:
Remove the node form the document model

updateActions() #

Update the 'done' action according to whether there are changes

Source:
Update the 'done' action according to whether there are changes

updateMwData(mwData) #

Update mwData object with the new values from the inspector or dialog

Parameters:

Name Type Description
mwData Object

MediaWiki data object

Source:
Update mwData object with the new values from the inspector or dialog