static @Nullable String getSelectionText(@Nullable Editor editor) {
    if (editor == null) return null;
    return editor.getSelectionModel().getSelectedText(true);
  }
static @Nullable String getSelectionText(@Nullable Editor editor)