Skip to content
Document Authoring DA  API Docs v1.10.0
npmGitHub

LineBreak

LineBreak:

{
type: "line-break";
}

Represents a line break (soft return) within a paragraph.

LineBreak is an inline element that creates a new line within the same paragraph without starting a new paragraph. This is also known as a “soft return” or “line wrap” and is typically inserted with Shift+Enter in word processors.

Unlike starting a new paragraph, a line break:

  • Keeps the text in the same paragraph
  • Maintains paragraph-level formatting and numbering
  • Creates visual line separation without semantic paragraph separation

Line breaks can be added programmatically using TextView.addLineBreak.

Find all line breaks in a paragraph:

const inlines = textView.inlines();
const lineBreaks = inlines.filter(ri => ri.inline.type === 'line-break');
console.log(`Found ${lineBreaks.length} line breaks`);

type: "line-break"

Type discriminator for inline elements.

Always has the value 'line-break'. Use this property to identify line break elements within text content.