Commit cabbaf2
Unselect uploaded image in case it is the first element in editor
Tiptap `setImage()` marks the added image as selected when added as
first element in the document), which leads to the image being
overwritten by subsequent `insertContent()` command.
See ueberdosis/tiptap#3355 for the relevant
upstream bug.
Mitigate this bug by explicitly placing the cursor at the end of the
selection between adding the image and the line break.
Signed-off-by: Jonas <jonas@freesources.org>1 parent 75f4571 commit cabbaf2
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
198 | 212 | | |
199 | 213 | | |
200 | 214 | | |
| |||
0 commit comments