Commit 0f28d9c
authored
fix(react): simplify Tiptap component API and separate menu imports (#7494)
* fix(react): simplify Tiptap component API and separate menu imports
- Remove isReady from TiptapContextType, editor is now always available
- Move BubbleMenu and FloatingMenu to @tiptap/react/menus entrypoint
- Add backwards-compatible instance prop (deprecated in favor of editor)
- Add helpful error when useTiptap is used outside provider
* Validate editor prop and update demo imports
Throw an error in TiptapWrapper when neither editor nor instance is
provided. Remove the forced cast and expand the deprecation comment to
note upcoming removal. Update demo example imports to use .js/.jsx file
extensions.
* Remove editor prop from BubbleMenu example1 parent 2d6de06 commit 0f28d9c
5 files changed
Lines changed: 72 additions & 197 deletions
File tree
- .changeset
- demos/src/Examples/Default/React
- packages/react/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 14 | | |
19 | 15 | | |
20 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
0 commit comments