Paragraph constructor
Paragraph({})
Implementation
Paragraph({
required List<Line> lines,
required this.type,
this.blockAttributes,
String? id,
}) : _lines = List<Line>.from(lines),
id = id == null || id.trim().isEmpty ? nanoid(8) : id,
_sealed = type == ParagraphType.block
? true
: lines.isNotEmpty && lines.length == 1 && lines.first.isNotEmpty
? lines.first.length > 1
? false
: lines.single.isNewLine || lines.single.isEmbedFragment
: false;