The hardBreak
node inserts a new line in a text string. It's the equivalent to a <br/> in HTML.
hardBreak
is an inline node.
1 2{ "version": 1, "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "Hello" }, { "type": "hardBreak" }, { "type": "text", "text": "world" } ] } ] }
Name | Required | Type | Value |
---|---|---|---|
type | ✔ | string | "hardBreak" |
attrs | object | ||
attrs.text | string | "\n" |
Rate this page: