import { Extension } from '../../../../../../../node_modules/.pnpm/@tiptap_core@3.20.0_@tiptap_pm@3.15.3/node_modules/@tiptap/core/dist/index.mjs';

const ResetMarksOnEnter = Extension.create({
  name: "resetMarksOnEnter",
  addKeyboardShortcuts() {
    return {
      Enter: ({ editor }) => {
        if (editor.isActive("bold") || editor.isActive("italic") || editor.isActive("strike") || editor.isActive("underline") || editor.isActive("code")) {
          editor.commands.splitBlock({ keepMarks: false });
          return true;
        }
        return false;
      }
    };
  }
});

export { ResetMarksOnEnter };
