@tiptap/core 2.0.0-beta.140 → 2.0.0-beta.141
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/packages/core/src/style.d.ts +1 -1
- package/dist/packages/core/src/types.d.ts +1 -1
- package/dist/tiptap-core.cjs.js +8 -1
- package/dist/tiptap-core.cjs.js.map +1 -1
- package/dist/tiptap-core.esm.js +8 -1
- package/dist/tiptap-core.esm.js.map +1 -1
- package/dist/tiptap-core.umd.js +8 -1
- package/dist/tiptap-core.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/commands/focus.ts +9 -2
- package/src/style.ts +1 -0
- package/src/types.ts +1 -1
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.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.141",
|
|
5
5
|
"homepage": "https://tiptap.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tiptap",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"url": "https://github.com/ueberdosis/tiptap",
|
|
45
45
|
"directory": "packages/core"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "53f6ad47bcb6c6f718faef6245061fe023c94d61"
|
|
48
48
|
}
|
package/src/commands/focus.ts
CHANGED
|
@@ -16,15 +16,22 @@ function resolveSelection(state: EditorState, position: FocusPosition = null) {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
const { size } = state.doc.content
|
|
19
|
+
const { size } = state.doc.content
|
|
21
20
|
|
|
21
|
+
if (position === 'end') {
|
|
22
22
|
return {
|
|
23
23
|
from: size,
|
|
24
24
|
to: size,
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
if (position === 'all') {
|
|
29
|
+
return {
|
|
30
|
+
from: 0,
|
|
31
|
+
to: size,
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
28
35
|
return {
|
|
29
36
|
from: position,
|
|
30
37
|
to: position,
|
package/src/style.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -212,7 +212,7 @@ export type ChainedCommands = {
|
|
|
212
212
|
|
|
213
213
|
export type CanCommands = SingleCommands & { chain: () => ChainedCommands }
|
|
214
214
|
|
|
215
|
-
export type FocusPosition = 'start' | 'end' | number | boolean | null
|
|
215
|
+
export type FocusPosition = 'start' | 'end' | 'all' | number | boolean | null
|
|
216
216
|
|
|
217
217
|
export type Range = {
|
|
218
218
|
from: number,
|