Extends
Constructor
new ve.ui.MWLinkAction(surface)
#
Hierarchy
Link action.
Opens either MWLinkAnnotationInspector or MWLinkNodeInspector depending on what is selected.
Parameters:
Name | Type | Description |
---|---|---|
surface |
ve.ui.Surface | Surface to act on |
Methods
autolinkMagicLink() → {boolean}
#
Autolink the selected RFC/PMID/ISBN, which may have trailing punctuation followed by whitespace.
- Source:
- See:
-
Returns:
True if the selection is a valid RFC/PMID/ISBN and the autolink action was executed; otherwise false.
- Type
- boolean
Autolink the selected RFC/PMID/ISBN, which may have trailing punctuation followed by whitespace.
getLinkAnnotation() → {ve.dm.MWExternalLinkAnnotation|ve.dm.MWInternalLinkAnnotation}
#
Returns:
The annotation to use
getTrailingPunctuation()
#
Match the trailing punctuation set used for autolinks in wikitext. Closing parens are only stripped if open parens are missing from the candidate text, so that URLs with embedded matched parentheses (like wiki articles with disambiguation text) autolink nicely.
open() → {boolean}
#
Open either the 'link' or 'linkNode' window, depending on what is selected.
Returns:
Action was executed
- Type
- boolean
getLinkAnnotation(linktext, doc) → {ve.dm.MWExternalLinkAnnotation|ve.dm.MWInternalLinkAnnotation}static
#
Get a link annotation from specified link text
This is a static version of the method that can be used in the converter.
Parameters:
Name | Type | Description |
---|---|---|
linktext |
string | Link text |
doc |
HTMLDocument | Document |
Returns:
The annotation to use
Get a link annotation from specified link text
This is a static version of the method that can be used in the converter.