Skip to content

Commit

Permalink
fix(MediaHandler): Remove workaround to add newline between images
Browse files Browse the repository at this point in the history
Fixes: #3427

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Dec 6, 2023
1 parent 0765273 commit 4f7bc37
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/components/Editor/MediaHandler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,8 @@ export default {
// subsequent editor inserts (see tiptap#3355). So unselect the image by placing
// the cursor at the end of the selection.
this.$editor.commands.focus(selection.to)
} else {
// Place the cursor after the inserted image node
this.$editor.commands.focus(selection.to + 2)
}
// Insert a newline to allow placing the cursor in between subsequent images
this.$editor.chain().insertContent('<br />').focus().run()
// Scroll image into view
this.$editor.commands.scrollIntoView()
Expand Down

0 comments on commit 4f7bc37

Please sign in to comment.