@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/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.140",
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": "5844a8893c1d0b888b3a338ce3fb3994383a9eef"
47
+ "gitHead": "53f6ad47bcb6c6f718faef6245061fe023c94d61"
48
48
  }
@@ -16,15 +16,22 @@ function resolveSelection(state: EditorState, position: FocusPosition = null) {
16
16
  }
17
17
  }
18
18
 
19
- if (position === 'end') {
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
@@ -35,6 +35,7 @@ img.ProseMirror-separator {
35
35
  display: none;
36
36
  pointer-events: none;
37
37
  position: absolute;
38
+ margin: 0;
38
39
  }
39
40
 
40
41
  .ProseMirror-gapcursor:after {
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,