"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const Slate = require("slate");
const withNewline = (editor) => {
  const { onKeyDown } = editor;
  Object.assign(editor, {
    onKeyDown: (e) => {
      if (e.key !== "Enter" || !e.shiftKey) {
        return onKeyDown(e);
      }
      e.preventDefault();
      Slate.Transforms.insertText(editor, "\n");
    }
  });
  return editor;
};
exports.withNewline = withNewline;
//# sourceMappingURL=withNewline.cjs.map
