insertParagraph static method

DiagramTextEditResult insertParagraph({
  1. required TextStory story,
  2. required int start,
  3. required int end,
  4. DiagramTextDefinition text = const PlainTextDefinition(),
  5. 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,
);