About Rich Text

Some methods accept values with rich text, which you format using a subset of standard HTML tags and CSS styles.

Supported HTML tags

  • <p> (Paragraph)
  • <h1>, <h2>, <h3>, <h4>, <h5>, and <h6> (Headings)
  • <a> (Anchor/link)
  • <span> (Inline)
  • <strong> (Bold)
  • <em> (Italicize)
  • <u> (Underline)
  • <ul>, <ol>, and <li> (Lists)
  • <br> (Line break)

Inline styling

  • style
  • dir

Supported style properties

  • font-face
  • font-size
  • font-weight
  • font-style
  • text-decoration
  • color
  • background-color
  • text-align
  • margin-left
  • text-shadow
  • line-height
  • letter-spacing

Quote escaping

For strings in your code defined with double quotes, any double quotes in the string need to be escaped using \.

Example:

  • "<p><span style=\"color:#cb2026\">This is red text</span></p>"
  • '<p><span style="color:#cb2026;">This is red text</span></p>'

Examples

Copy
Copy
Copy
Did this help?