onlyShowInTextType function

bool onlyShowInTextType(
  1. EditorState editorState
)

Implementation

bool onlyShowInTextType(EditorState editorState) {
  final selection = editorState.selection;
  if (selection == null) {
    return false;
  }
  final nodes = editorState.getNodesInSelection(selection);
  return nodes.every(
    (element) =>
        element.delta != null && toolbarItemWhiteList.contains(element.type),
  );
}