onlyShowInSingleSelectionAndTextType function
Implementation
bool onlyShowInSingleSelectionAndTextType(EditorState editorState) {
final selection = editorState.selection;
if (selection == null || !selection.isSingle) {
return false;
}
final node = editorState.getNodeAtPath(selection.start.path);
if (node == null) {
return false;
}
return node.delta != null && toolbarItemWhiteList.contains(node.type);
}