Skip to content

Fix: Remove unnecessary <br> after image insertion to fix extra line break#415

Open
Serranosoft wants to merge 1 commit intowxik:masterfrom
Serranosoft:fix-extra-line-break-after-image-insertion
Open

Fix: Remove unnecessary <br> after image insertion to fix extra line break#415
Serranosoft wants to merge 1 commit intowxik:masterfrom
Serranosoft:fix-extra-line-break-after-image-insertion

Conversation

@Serranosoft
Copy link
Copy Markdown

This PR removes the redundant line that inserts a <br> after each image (issue related #414) :

exec('insertHTML', "<br/>");

  • Every image inserted is wrapped automatically in a <div> block.
  • The <div> ensures the cursor is placed correctly so the html will not be empty and the editor remains editable.
  • The previous <br> caused unexpected line break after every inserted image.
  • This change improves UX by allowing multiple images to be inserted consecutively

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant