onlyShowInTextType function
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),
);
}