Rate this page:

Mark - textColor

Purpose

The textColor mark sets <style="color: red">colour styling. This mark applies to text nodes.

Example

1
2
{
  "type": "text",
  "text": "Hello world",
  "marks": [
    {
      "type": "textColor",
      "attrs": {
        "color": "#97a0af"
      }
    }
  ]
}

Combinations with other marks

The textColor cannot be combined with the following marks:

Fields

NameRequiredTypeValue
typestring"textColor"
attrsobject
attrs.colorstringA color defined in HTML hexadecimal format, for example #daa520.

Rate this page: