Rich text HTML specifications
Multiple format values can be set in the rich text field of Next Design, and the formatted data displayed in the UI is stored in HTML format.
However, because HTML specifications are diverse and complex, there are certain limitations to the HTML handled by the rich text field.
To correctly obtain and set HTML format values with rich text-related APIs, use HTML that conforms to the following specifications.
- For rich text-related APIs, see Design information > Model > Working with rich text fields.
Overall structure of HTML
Below is the overall structure of rich text HTML. The relationship between elements and attributes that can be handled by Next Design's rich text is shown.
The following explains the details of the attributes of each element.
Rich text HTML
Rich text HTML corresponds to the <html> tag.
Attribute name | Key | Multiplicity | Value range | Notes |
---|---|---|---|---|
Header | - | 0..1 | Header | Header content is empty. If you want to specify a style, specify it for each individual HTML element. |
Body | - | 1 | Body | - |
Body
Body corresponds to the <body> tag.
Attribute name | Key | Multiplicity | Value range |
---|---|---|---|
Root element | - | 1..* | Paragraph List Table |
Paragraph
A paragraph corresponds to the <p> tag.
Attribute name | Key | Multiplicity | Value range | Remarks |
---|---|---|---|---|
Paragraph element | - | 1..* | Text container Image | - |
Margin | margin | 0..1 | px unit | - |
Top margin | margin-top | 0..1 | px unit | - |
Left margin | margin-left | 0..1 | px unit | - |
Bottom margin | margin-bottom | 0..1 | px unit | - |
Right margin | margin-right | 0..1 | px unit | - |
Line height | line-height | 0..1 | Unitless number | - |
Horizontal alignment | text-align | 0..1 | left center right justify | - |
Indentation | text-indent | 0..1 | px unit | - |
Text Containers
Text containers correspond to the <span> tag.
Attribute name | Key | Multiplicity | Value range | Remarks |
---|---|---|---|---|
Text container element | - | 0..* | Text decoration Line break Link | - |
Text | - | 0..1 | String | - |
Font | font-family | 0..1 | Single font family | - |
Font Size | font-size | 0..1 | px unit | - |
Text decoration (Strikethrough) | text-decoration | 0..1 | line-through | - |
Background color | background-color | 0..1 | RGB hexadecimal color Color keyword1 | - |
Character color | color | 0..1 | RGB hexadecimal color Color keyword1 | - |
Text decoration
Text decoration corresponds to one of the following tags:
- Superscript: <sup>
- Subscript: <sub>
- Underline: <u>
- Italics: <i>
- Bold: <b>
Attribute name | Key | Multiplicity | Range |
---|---|---|---|
Text | - | 1 | String |
Image
Image corresponds to the <img> tag.
Attribute name | Key | Multiplicity | Range | Notes |
---|---|---|---|---|
Source | src | 1 | URL Local absolute path base64 | - |
Width | width | 0..1 | px | Image's specific width. |
Height | height | 0..1 | px | Image's specific height. |
base64
base64 specifies the source in the format data:image/{image format};base64,{Base64 string}
.
Attribute name | Key | Multiplicity | Range |
---|---|---|---|
Image Format | - | 1 | png jpeg bmp |
List
A list corresponds to one of the following tags.
- Unordered list: <ul>
- Ordered list: <ol>
Attribute name | Key | Multiplicity | Range |
---|---|---|---|
List item | li | 1..* | List item |
List item
List items correspond to the <li> tag.
Attribute name | Key | Multiplicity | Range |
---|---|---|---|
List | - | 0..* | List |
Text container | - | 1..* | Text container |
Line height | line-height | 0..1 | Unitless number |
Marker | list-style-type | 0..1 | disc circle square decimal lower-latin lower-roman |
Table
Tables correspond to the <table> and <tbody> tags.
Attribute name | Key | Multiplicity | Range | Notes |
---|---|---|---|---|
Table row | - | 1..* | Table row | - |
Top border | border-top | 0..1 | Width: in px Shape: none, dotted, dashed, solid, double Color: RGB hexadecimal notation, color keyword1 | The three values can be specified in any order, but all values must be set. |
Left border | border-left | 0..1 | Width: in px Shape: none, dotted, dashed, solid, double Color: RGB hexadecimal notation, color keyword1 | The three values can be specified in any order, but all values must be set. |
Bottom border | border-bottom | 0..1 | Width: in px Shape: none, dotted, dashed, solid, double Color: RGB hex, color keyword1 | The three values can be in any order, but all must be set. |
Right border | border-right | 0..1 | Width: in px Shape: none, dotted, dashed, solid, double Color: RGB hex, color keyword1 | The three values can be in any order, but all must be set. |
Width | width | 0..1 | in px | If a width is set for the table cell, it will be ignored and this setting will be applied. |
Table row
Table rows correspond to the <tr> tag.
Attribute name | Key | Multiplicity | Range |
---|---|---|---|
Table cell | - | 1..* | Table cell |
Height | height | 0..1 | px unit |
Table cell
Table cells correspond to the <td> tag.
Attribute name | Key | Multiplicity | Range | Notes |
---|---|---|---|---|
Block element | - | 0..* | Paragraph List | - |
Column span | colspan | 0..1 | Integer | Number of cells to span horizontally. |
Row span | rowspan | 0..1 | Integer | Number of cells to span vertically. |
Top border | border-top | 0..1 | Width: in px Shape: none, dotted, dashed, solid, double Color: RGB hexadecimal notation, color keyword1 | The three values can be specified in any order, but all of them must be set. |
Left border | border-left | 0..1 | Width: in px Shape: none, dotted, dashed, solid, double Color: RGB hexadecimal notation, color keyword1 | The three values can be specified in any order, but all of them must be set. |
Bottom border | border-bottom | 0..1 | Width: in px Shape: none, dotted, dashed, solid, double Color: RGB hexadecimal notation, color keyword1 | The three values can be specified in any order, but all of them must be set. |
Right border | border-right | 0..1 | Width: px Shape: none, dotted, dashed, solid, double Color: RGB hex, color keyword 1 | The three values can be specified in any order, but all values must be set. |
Padding | padding | 0..1 | px | - |
Background color | background-color | 0..1 | RGB hex color Color keyword 1 | - |
Vertical alignment | vertical-align | 0..1 | top middle bottom | - |
Width | width | 0..1 | px | If the table width is set, the value set therein will be applied and this setting will be ignored. |
Link
Links correspond to the <a> tag.
Attribute name | Key | Multiplicity | Range |
---|---|---|---|
Text | - | 1 | String |
URL | href | 1 | String |