Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Empty paragraphs are added around the image element #102

Open
kurian86 opened this issue Nov 6, 2024 · 0 comments
Open

[Bug] Empty paragraphs are added around the image element #102

kurian86 opened this issue Nov 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kurian86
Copy link
Contributor

kurian86 commented Nov 6, 2024

When an image element is present, empty paragraphs are added around it when loading the content in the editor.

Expected Behavior:
These empty paragraphs should not be added.

<p>Simple example</p>
<p><div style=\"text-align: center;\" class=\"image\"><img height=\"auto\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAGCAYAAAAPDoR2AAAAZklEQVR4XkXNSRKAIAwEQD6vyBJx4ScKKPi3GBKrPExx6MygjD4RXMbVX7hR9rlSGsbQUE2E3gouHeFm7BE0iUGaH8KHljD4ghtIM/L0I2h0+v/ts1DppeY4HKjHPp0xuMIHq6+cFyEtdlXiYF1iAAAAAElFTkSuQmCC\" align=\"center\" inline=\"false\"></div></p>
<p>With two lines</p>

Actual Behavior:
Empty paragraphs are added around the image element.

<p>Simple example</p>
<p></p>
<p><div style=\"text-align: center;\" class=\"image\"><img height=\"auto\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAGCAYAAAAPDoR2AAAAZklEQVR4XkXNSRKAIAwEQD6vyBJx4ScKKPi3GBKrPExx6MygjD4RXMbVX7hR9rlSGsbQUE2E3gouHeFm7BE0iUGaH8KHljD4ghtIM/L0I2h0+v/ts1DppeY4HKjHPp0xuMIHq6+cFyEtdlXiYF1iAAAAAElFTkSuQmCC\" align=\"center\" inline=\"false\"></div></p>
<p></p>
<p>With two lines</p>

If you save this content and load it again, additional empty paragraphs will be added.

<p>Simple example</p>
<p></p>
<p></p>
<p><div style=\"text-align: center;\" class=\"image\"><img height=\"auto\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAGCAYAAAAPDoR2AAAAZklEQVR4XkXNSRKAIAwEQD6vyBJx4ScKKPi3GBKrPExx6MygjD4RXMbVX7hR9rlSGsbQUE2E3gouHeFm7BE0iUGaH8KHljD4ghtIM/L0I2h0+v/ts1DppeY4HKjHPp0xuMIHq6+cFyEtdlXiYF1iAAAAAElFTkSuQmCC\" align=\"center\" inline=\"false\"></div></p>
<p></p>
<p></p>
<p>With two lines</p>

Steps to Reproduce:

  1. Set CONTENT VALUE as
<p>Simple example</p>
<p><div style=\"text-align: center;\" class=\"image\"><img height=\"auto\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAGCAYAAAAPDoR2AAAAZklEQVR4XkXNSRKAIAwEQD6vyBJx4ScKKPi3GBKrPExx6MygjD4RXMbVX7hR9rlSGsbQUE2E3gouHeFm7BE0iUGaH8KHljD4ghtIM/L0I2h0+v/ts1DppeY4HKjHPp0xuMIHq6+cFyEtdlXiYF1iAAAAAElFTkSuQmCC\" align=\"center\" inline=\"false\"></div></p>
<p>With two lines</p>
  1. Observe that empty paragraphs are added
@kurian86 kurian86 changed the title [Bug] Empty paragraphs are added after each element [Bug] Empty paragraphs are added around the image element Nov 6, 2024
@hunghg255 hunghg255 added the bug Something isn't working label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants