@welshman/editor 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,5 +2,7 @@ import { type HardBreakOptions } from "@tiptap/extension-hard-break";
2
2
  export interface BreakOrSubmitOptions extends HardBreakOptions {
3
3
  /** Handler for when enter is pressed. */
4
4
  submit: () => void;
5
+ /** Whether to call `submit` on unmodified Enter */
6
+ aggressive?: boolean;
5
7
  }
6
8
  export declare const BreakOrSubmit: import("@tiptap/core").Node<BreakOrSubmitOptions, any>;
@@ -7,6 +7,13 @@ export const BreakOrSubmit = HardBreak.extend({
7
7
  this.options.submit();
8
8
  return true;
9
9
  },
10
+ "Enter": () => {
11
+ if (this.options.aggressive) {
12
+ this.options.submit();
13
+ return true;
14
+ }
15
+ return false;
16
+ },
10
17
  };
11
18
  },
12
19
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@welshman/editor",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "scripts": {
5
5
  "pub": "npm run check && npm run build && npm publish",
6
6
  "fix": "",