Mark - link

Purpose

The link is intended to be applied to text nodes to annotate the text with a hyperlink.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
{
  "type": "text",
  "text": "Hello world",
  "marks": [
    {
      "type": "link",
      "attrs": {
        "href": "http://google.com",
        "title": "Google"
      }
    }
  ]
}

Fields

NameMandatoryTypeValueNotes
typestring"link"
attrsobject
attrs.collectionstring
attrs.hrefstringURIThe href value for a HTML <a> element
attrs.idstring
attrs.occurrenceKeystring
attrs.titlestringTitle for the URIThe title value for a HTML <a> element. Generally displayed on hover