The hardBreak node inserts a new line in a text string. It’s the equivalent to a <br> in HTML.
Although it has no functional impact, the hardBreak mark is permitted to have a text attribute. If it is provided, then its value of must be "\n".
1 2 3 4 5 6doc(p( text("Hello"), br(), text("world") ));
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23{ "version": 1, "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "Hello" }, { "type": "hardBreak" }, { "type": "text", "text": "world" } ] } ] }
Hello world
| Confluence | Jira |
|---|---|
| ✅ | ✅ |
❌ N/A
hardBreak"\n" (the only valid value is a string containing a literal newline char)Rate this page: