Class orion.links.TextLinkService
A service for finding and inferring hyperlinks from a text input. The service
examines a segment of text, and returns a DOm node with hyperlinks inserted in the appropriate
locations. For example, the service could detect email addresses and convert them into
mailto: hyperlinks.
Defined in: </shared/eclipse/e4/orion/I201404012230/bundles/org.eclipse.orion.client.ui/web/orion/links.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
orion.links.TextLinkService(options)
Instantiates the text link service.
|
Method Attributes | Method Name and Description |
---|---|
addLinks(text, parent)
Adds links to an input text string.
|
Class Detail
orion.links.TextLinkService(options)
Instantiates the text link service. Clients should obtain the
orion.core.textlink service from the service registry rather
than instantiating this service directly. This constructor is intended
for use by page initialization code that is initializing the service registry.
- Parameters:
- {Object} options
- The service options
Method Detail
{Object}
addLinks(text, parent)
Adds links to an input text string. The links are added to the provided node, or to a new div
node if not input node is provided.
- Parameters:
- {String} text
- The string to compute links for
- {Object} parent Optional
- The optional parent DOM node to place the links into
- Returns:
- {Object} A DOM node containing the provided text as a series of text and anchor child nodes