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

paste with cleanPastedHTML=true dont keep line break #1600

Open
julienGrd opened this issue May 5, 2023 · 0 comments
Open

paste with cleanPastedHTML=true dont keep line break #1600

julienGrd opened this issue May 5, 2023 · 0 comments

Comments

@julienGrd
Copy link

Description

Hello guys, i try to paste some html in an editor and i notice my br tag are not kept

this is the configuration :

paste: {
                forcePlainText: false,
                cleanPastedHTML: true,
                cleanReplacements: [],
                cleanAttrs: ['class', 'style', 'dir'],
                cleanTags: ['meta'],
                unwrapTags: ['div', 'li', 'ul', 'code', 'em']
            },

and the HTML i try to paste

<p>TITRE 1</p><p><u>coucou</u></p><p>plus couc</p><br><p>TITRE 2</p><p><b>test</b></p><br><p>TITRE 3</p>

result of the paste in the editor

<p>TITRE 1</p><p><u>coucou</u></p><p>plus couc</p><p>TITRE 2</p><p><b>test</b></p><p>TITRE 3</p>

Its reproductible on the demo https://yabwe.github.io/medium-editor/demo.html

If I put cleanPastedHTML to false, the br are kept

Versions

  • medium-editor: 5.23
  • browser: Chrome 113
  • OS: Windows 11

There is a workaround for that ?

thanks !

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

No branches or pull requests

1 participant