@tiptap/core 2.7.0-pre.0 → 2.7.1

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.
@@ -1,3 +1,3 @@
1
+ import { Slice } from '@tiptap/pm/model';
1
2
  import { Plugin } from '@tiptap/pm/state';
2
- import { Slice } from 'packages/pm/model';
3
3
  export declare const DropPlugin: (onDrop: (e: DragEvent, slice: Slice, moved: boolean) => void) => Plugin<any>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/core",
3
3
  "description": "headless rich text editor",
4
- "version": "2.7.0-pre.0",
4
+ "version": "2.7.1",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -32,10 +32,10 @@
32
32
  "dist"
33
33
  ],
34
34
  "devDependencies": {
35
- "@tiptap/pm": "^2.7.0-pre.0"
35
+ "@tiptap/pm": "^2.7.1"
36
36
  },
37
37
  "peerDependencies": {
38
- "@tiptap/pm": "^2.7.0-pre.0"
38
+ "@tiptap/pm": "^2.7.0"
39
39
  },
40
40
  "repository": {
41
41
  "type": "git",
package/src/InputRule.ts CHANGED
@@ -216,6 +216,17 @@ export function inputRulesPlugin(props: { editor: Editor; rules: InputRule[] }):
216
216
  },
217
217
 
218
218
  props: {
219
+ handleTextInput(view, from, to, text) {
220
+ return run({
221
+ editor,
222
+ from,
223
+ to,
224
+ text,
225
+ rules,
226
+ plugin,
227
+ })
228
+ },
229
+
219
230
  handleDOMEvents: {
220
231
  compositionend: view => {
221
232
  setTimeout(() => {
@@ -235,20 +246,6 @@ export function inputRulesPlugin(props: { editor: Editor; rules: InputRule[] }):
235
246
 
236
247
  return false
237
248
  },
238
-
239
- keyup(view, event) {
240
- if (event.key.length === 1) {
241
- return run({
242
- editor,
243
- from: view.state.selection.from,
244
- to: view.state.selection.from,
245
- text: '',
246
- rules,
247
- plugin,
248
- })
249
- }
250
- return false
251
- },
252
249
  },
253
250
 
254
251
  // add support for input rules to trigger on enter
@@ -1,5 +1,5 @@
1
+ import { Slice } from '@tiptap/pm/model'
1
2
  import { Plugin, PluginKey } from '@tiptap/pm/state'
2
- import { Slice } from 'packages/pm/model'
3
3
 
4
4
  export const DropPlugin = (onDrop: (e: DragEvent, slice: Slice, moved: boolean) => void) => {
5
5
  return new Plugin({