import { Color as Color$1 } from '../../../../../../../node_modules/.pnpm/@tiptap_extension-text-style@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_/node_modules/@tiptap/extension-text-style/dist/index.mjs';
import { Plugin } from '../../../../../../../node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.mjs';

const Color = Color$1.extend({
  addProseMirrorPlugins() {
    return [
      ...this.parent?.() || [],
      new Plugin({
        props: {
          handleKeyDown: (_, event) => {
            if (event.key === "Enter") {
              this.editor.commands.unsetColor();
            }
            return false;
          }
        }
      })
    ];
  }
});

export { Color };
