insertParagraph static method
DiagramTextEditResult
insertParagraph({
- required TextStory story,
- required int start,
- required int end,
- DiagramTextDefinition text = const PlainTextDefinition(),
- bool typed = true,
Enter (typed) or a pasted newline replaces a selected range and splits
the resulting paragraph in one canonical operation, preserving declared
region boundaries. text decides the split paragraphs' metadata.
Implementation
static DiagramTextEditResult insertParagraph({
required TextStory story,
required int start,
required int end,
DiagramTextDefinition text = const PlainTextDefinition(),
bool typed = true,
}) => _ParagraphStructureCommands.insertParagraph(
story: story,
start: start,
end: end,
text: text,
typed: typed,
);