import { Transforms } from "slate";
const withNewline = (editor) => {
  const { onKeyDown } = editor;
  Object.assign(editor, {
    onKeyDown: (e) => {
      if (e.key !== "Enter" || !e.shiftKey) {
        return onKeyDown(e);
      }
      e.preventDefault();
      Transforms.insertText(editor, "\n");
    }
  });
  return editor;
};
export { withNewline };
//# sourceMappingURL=withNewline.js.map
