isRTL function
Implementation
bool isRTL(EditorState editorState) {
if (editorState.selection != null) {
final node = editorState.getNodeAtPath(editorState.selection!.end.path);
return node?.selectable?.textDirection() == TextDirection.rtl;
}
return false;
}