Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(MediaHandler): Remove workaround to add newline between images
Fixes: #3427

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Dec 6, 2023
commit 4f7bc371f9186e0e85196411a2d04ee4d4e7e5c4
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