@Override
  public @NotNull Result beforeCharTyped(char c, @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file, @NotNull FileType fileType) {
    var currentCaret = editor.getCaretModel().getCurrentCaret();
    var quoteInsertedAt = currentCaret.getUserData(QUOTE_INSERTED_AT);
    if (quoteInsertedAt != null) {
      currentCaret.putUserData(QUOTE_INSERTED_AT, null);
    }
    if ((c == '"' || (c == '\'' && hasHtml(file)))
        && quoteInsertedAt != null
        && quoteInsertedAt.position == currentCaret.getOffset()
        && quoteInsertedAt.quote != '{') {
      return Result.STOP;
    }
    if (c == '=' && WebEditorOptions.getInstance().isInsertQuotesForAttributeValue()) {
      if (XmlGtTypedHandler.fileContainsXmlLanguage(file)) {
        PsiDocumentManager.getInstance(project).commitDocument(editor.getDocument());

        PsiElement atParent = getAttributeCandidate(editor, file, false);
        if (atParent instanceof XmlAttribute && ((XmlAttribute)atParent).getValueElement() == null) {
          needToInsertQuotes = ((XmlAttribute)atParent).getValueElement() == null;
        }
      }
    }

    return super.beforeCharTyped(c, project, editor, file, fileType);
  }
@Override
  public @NotNull Result beforeCharTyped(char c, @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file, @NotNull FileType fileType)