Developer
Documentation
Resources
Get Support
Sign in
Developer
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Developer
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Last updated Oct 17, 2025

Node - hardBreak

Purpose

The hardBreak node inserts a new line in a text string. It's the equivalent to a <br/> in HTML.

Type

hardBreak is an inline node.

Example

1
2
{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {
          "type": "text",
          "text": "Hello"
        },
        {
          "type": "hardBreak"
        },
        {
          "type": "text",
          "text": "world"
        }
      ]
    }
  ]
}

Fields

NameRequiredTypeValue
typestring"hardBreak"
attrsobject
attrs.textstring"\n"

Rate this page: