Link-preview widget
The link-preview widget displays an image and text for a link.
Properties
Property |
Description |
Data type |
---|---|---|
|
JSON containing the properties that define the visual appearance of the item, as described in Context properties. |
string (JSON) |
|
Unique identifier of this widget. |
string |
|
Specifies whether the link opens in a new tab ( |
enum |
|
URL meta description on the page. |
string (URL) |
|
URL meta image on the page. |
string (URL) |
|
URL meta title on the page. |
string (URL) |
|
URL loaded when user clicks the preview link. |
string (URL) |
|
Specifies the size of the link preview relative to the height of the default transcript area. Supported values are:
Default value is |
enum |
type
|
Rich-media type, which is always LinkPreview . |
string |
Context properties
Context property |
Description |
Data type |
---|---|---|
|
Meta description color, as a hex color code. |
string (hex color code) |
|
Meta title color, as a hex color code. |
string (hex color code) |
Code sample
var obj = {
"widgetType": "form",
"widgetView": "inline",
"nodes":
[{
"id": "view1",
"controls": {
"0": {
"type": "LinkPreview",
"id": "lp1",
"metaUrl": "https://www.att.com/buy/phones/apple-iphone-11-64gb-purple.html",
"metaImgSrc": "https://www.att.com/catalog/en/idse/Apple/Apple iPhone 11/Purple-hero-zoom.png",
"metaTitle": "iPhone 11 - $700 Savings, Switch & Trade-In - AT&T",
"metaDescription": "Switch to AT&T & get up to $700 in
bill credit when you buy an iPhone 11 online plus trade-in of
eligible smartphone & qualifying installment and data plans. ",
"launchMode": "parent",
"context": {
"itemBackground": "#f5f5f5",
"itemBorder": "#e3e3e3",
"itemBorderRadius": 4,
"titleColor": "#0088cc"
}
}
}
}
],
"transitions": [
],
"initialView": "view1"
}{
"widgetType": "form",
"widgetView": "inline",
"nodes":
[{
"id": "view1",
"controls": {
"0": {
"type": "LinkPreview",
"id": "lp1",
"size": "small",
"metaUrl": "https://www.att.com/buy/phones/apple-iphone-11-64gb-purple.html",
"metaImgSrc": "https://www.att.com/favicon.ico",
"metaTitle": "iPhone 11 - $700 Savings, Switch & Trade-In - AT&T",
"metaDescription": "Switch to AT&T & get up to $700 in bill
credit when you buy an iPhone 11 online plus trade-in of
eligible smartphone & qualifying installment and data plans. ",
"launchMode": "parent",
"context": {
"itemBackground": "#f5f5f5",
"itemBorder": "#e3e3e3",
"itemBorderRadius": 4,
"titleColor": "#0088cc"
}
}
}
}
],
"transitions": [
],
"initialView": "view1"
}