Heading widget
The heading widget displays a styled text string.
Example
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 |
|
Heading level, ranging from 1 to 6. |
integer |
|
Text value displayed as a heading. |
string |
Context properties
These are the context
properties.
Context property |
Description |
Data type |
---|---|---|
|
Text color in hex color code. |
string (hex color code) |
|
Text alignment, which is one of: |
enum |
|
Heading size, in pixels. Note: Not recommended, because a heading has an intrinsic size. |
integer |
|
Heading style, which is one of:
Note: Not recommended, because a heading has an intrinsic style. |
enum |
type
|
Rich-media type, which is always Heading . |
string |
Code sample
var obj = {
"widgetType": "form",
"nodes":
[{
"id": "widget1",
"controls": {
"0": {
"type": "Heading",
"text": "This is a heading",
"level": 2
},
"1": {
"type": "Heading",
"text": "This is a heading",
"containerSpace": 5,
"level": 4
},
"2": {
"type": "Heading",
"text": "This is a heading",
"containerSpace": 20,
"context": {
"itemBackground": "#D3D3D3",
"textAlign": "left",
"text": "#0000ff",
"itemBorder": "#808080"
},
"level": 2
}
}
}
]
}