findTextInParagraph static method

AttributedText findTextInParagraph(
  1. String nodeId, [
  2. Finder? superEditorFinder
])

Returns the AttributedText within the ParagraphNode associated with the given nodeId.

There must be a ParagraphNode with the given nodeId, displayed in a SuperEditor.

By default, this method expects a single SuperEditor in the widget tree and finds it byType. To specify one SuperEditor among many, pass a superEditorFinder.

Implementation

static AttributedText findTextInParagraph(String nodeId, [Finder? superEditorFinder]) {
  final documentLayout = _findDocumentLayout(superEditorFinder);
  return (documentLayout.getComponentByNodeId(nodeId) as TextComponentState).widget.text;
}