code: public static String getTextType(String mimeType, String extension) {
          String textType = null;
          if (StringUtils.isNotBlank(mimeType)) {
              textType = EDITOR_MODES.get(mimeType);
              if (StringUtils.isBlank(textType)) {
                  String[] parts = StringUtils.split(mimeType, '/');
                  if (parts.length > 1) {
                      textType = EDITOR_MODES.get(parts[1]);
                  }
                  if (StringUtils.isBlank(textType)) {
                      if (StringUtils.isNotBlank(extension)) {
                          textType = EDITOR_MODES.get(extension);
                      }
                      if (StringUtils.isBlank(textType)) {
                          textType = EDITOR_MODES.get(parts[0]);
                      }
                  }
              }
          }
          if (StringUtils.isBlank(textType)) {
              if (StringUtils.isNotBlank(extension)) {
                  textType = EDITOR_MODES.get(extension);
              }
          }
          if (textType == null) {
              textType = "";
          }
          return textType;
      }
docs: Determines the text type for the current node using the mimeType (if present) and the extension.
  
  @return the type of the text file (script language) or ""