'use strict';

const index = require('../../../../../../../node_modules/.pnpm/@tiptap_extension-text-style@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_/node_modules/@tiptap/extension-text-style/dist/index.cjs');
const index$1 = require('../../../../../../../node_modules/.pnpm/prosemirror-state@1.4.4/node_modules/prosemirror-state/dist/index.cjs');

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

exports.Color = Color;
