Extends
Constructor
new ve.ui.MWLinkAnnotationInspector([config])
#
Hierarchy
Children
Inspector for applying and editing labeled MediaWiki internal and external links.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
config |
Object |
optional |
Configuration options |
Methods
createAnnotationInput()
#
createExternalAnnotationInput() → {ve.ui.MWExternalLinkAnnotationWidget}
#
Returns:
createInternalAnnotationInput() → {ve.ui.MWInternalLinkAnnotationWidget}
#
Returns:
getActionProcess()
#
getAnnotationFromFragment(fragment) → {ve.dm.MWInternalLinkAnnotation|ve.dm.MWExternalLinkAnnotation|null
}
#
null
}
#
Gets an annotation object from a fragment.
The type of link is automatically detected based on some crude heuristics.
Parameters:
Name | Type | Description |
---|---|---|
fragment |
ve.dm.SurfaceFragment | Current selection |
Returns:
- Type
-
ve.dm.MWInternalLinkAnnotation
|
ve.dm.MWExternalLinkAnnotation
|
null
getInsertionData()
#
getInsertionText()
#
getReadyProcess()
#
getSetupProcess()
#
getTeardownProcess()
#
initialize()
#
isExternal() → {boolean}
#
Check if the current input mode is for external links
Returns:
Input mode is for external links
- Type
- boolean
newExternalLinkAnnotation(element) → {ve.dm.MWExternalLinkAnnotation}
#
newInternalLinkAnnotationFromTitle(title) → {ve.dm.MWInternalLinkAnnotation}
#
onExternalLinkChange(annotation)
#
Handle change events on the external link widget
Parameters:
Name | Type | Description |
---|---|---|
annotation |
ve.dm.MWExternalLinkAnnotation |
onExternalLinkInputChange(value)
#
Handle change events on the external link widget's input
Parameters:
Name | Type | Description |
---|---|---|
value |
string | Current value of input widget |
onInternalLinkChange(annotation)
#
Handle change events on the internal link widget
Parameters:
Name | Type | Description |
---|---|---|
annotation |
ve.dm.MWInternalLinkAnnotation |
onInternalLinkChangeResultsChange(items, index)
#
Handle list change events ('add') from the interal link's result widget
Parameters:
Name | Type | Description |
---|---|---|
items |
Array.<OO.ui.OptionWidget> | Added items |
index |
number | Index of insertion point |
onInternalLinkInputChange(value)
#
Handle change events on the internal link widget's input
Parameters:
Name | Type | Description |
---|---|---|
value |
string | Current value of input widget |
onInternalLinkSearchResultsChoose(item)
#
Handle choose events from the result widget
Parameters:
Name | Type | Description |
---|---|---|
item |
OO.ui.OptionWidget | Chosen item |
onLabelInputChange(value)
#
Handle change events on the label input
Parameters:
Name | Type | Description |
---|---|---|
value |
string |
onLinkInputEnter(e)
#
Handle enter events on the external/internal link inputs
Parameters:
Name | Type | Description |
---|---|---|
e |
jQuery.Event | Key press event |
onLinkTypeIndexSet(tabPanel)
#
Handle set events from the linkTypeIndex layout
Parameters:
Name | Type | Description |
---|---|---|
tabPanel |
OO.ui.TabPanelLayout | Current tabPanel |