Properties
isModified
#
- Deprecated:
- Moved to ve.ui.MWExtensionWindow.prototype.isSaveable
- Source:
allowedEmptystatic
#
Extension is allowed to have empty contents
Properties:
Type | Description |
---|---|
boolean |
dirstatic
#
Inspector's directionality, 'ltr' or 'rtl'
Leave as null to use the directionality of the current fragment.
Properties:
Type | Description |
---|---|
string
|
null
|
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 |
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.
Returns:
Placeholder text
- Type
- string
getNewElement() → {Object}
#
Create an new data element for the model class associated with this inspector
Returns:
Element data
- Type
- Object
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.
Returns:
mwData would contain new user input
- Type
- boolean
initialize()
#
insertOrUpdateNode()
#
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.
Returns:
mwData would be modified
- Type
- boolean
onChange()
#
Handle change event.
removeNode()
#
Remove the node form the document model
updateActions()
#
Update the 'done' action according to whether there are changes