DiagramTextSelectionFormatter typedef

DiagramTextSelectionFormatter = bool Function(String label, TextRun format(TextRun run))

Formats the text selection of a mounted text editor. Returns false when no editor handles the change, so it applies to the canonical story instead.

Implementation

typedef DiagramTextSelectionFormatter = bool Function(
  String label,
  TextRun Function(TextRun run) format,
);