Skip to content

hardbreak

Forces a new line within the same paragraph. A hard break is not a new paragraph — the content before and after the break remains inside the same paragraph node.

Attributes

AttributeRequiredTypeDescription
isInlineYesbooleanWhether the break is inline. The SMS RFM parser always produces false. The Rule editor may produce true for inline breaks created inside the editor.

Children

None (leaf node).

Parent nodes

Available in

  • SMS RFM (rc-sms)

JSON

json
{ "type": "hardbreak", "attrs": { "isInline": false } }

A paragraph containing a hard break:

json
{
  "type": "paragraph",
  "content": [
    { "type": "text", "text": "First line" },
    { "type": "hardbreak", "attrs": { "isInline": false } },
    { "type": "text", "text": "Second line — same paragraph" }
  ]
}

SMS RFM syntax

Write a backslash at the end of a line, or two trailing spaces before the newline:

First line\
Second line — same paragraph
First line  
Second line — same paragraph

Both forms produce the same hardbreak node. The backslash form is preferred because trailing spaces are invisible in most editors.

Hard break vs new paragraph

SourceProduces
Backslash at end of linehardbreak inside the current paragraph
Two trailing spaceshardbreak inside the current paragraph
Blank lineNew paragraph node
Line one\
Line two          ← same paragraph as line one

Line three        ← new paragraph