LinkAddition
The addition object for defining links in text components that don’t use HTML or Markdown formatting.
Declaration
object LinkAdditionProperties
| Name | Type | Description |
|---|---|---|
rangeLength Required | integer | The number of text characters to highlight as the link. |
rangeStart Required | integer | The starting character index for the link addition. A range starts at If you specify |
type Required | string | The type of addition. Use |
URL Required | SupportedURLs | The URL to open when a person interacts with the range of text specified in the addition. |
Discussion
Use a Link addition to add a link in a text component. You can link to an anchor in the same document, to another document in News, or to an external site.
Example
{
"components": [
{
"role": "body",
"text": "This is an example of a link addition",
"additions": [
{
"type": "link",
"URL": "http://www.apple.com",
"rangeStart": 0,
"rangeLength": 20
}
]
}
]
}