@tiptap/core 2.7.0-pre.0 → 2.7.0
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.
- package/dist/index.cjs +10 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -13
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +10 -13
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/InputRule.ts +11 -14
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
|
|
4
|
+
"version": "2.7.0",
|
|
5
5
|
"homepage": "https://tiptap.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tiptap",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@tiptap/pm": "^2.7.0
|
|
35
|
+
"@tiptap/pm": "^2.7.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@tiptap/pm": "^2.7.0-pre.0"
|
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
|