-
-
Notifications
You must be signed in to change notification settings - Fork 336
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
Pasting some text from Google docs or Words adds additional br #683
Comments
The second |
What did you expect a paragraph with only a hard break to look like? The same as an empty one? (It will look like an empty one, when rendered to uneditable HTML, but during editing, it is important to be able to place the cursor both before and after the existing hard break, so ProseMirror renders it like this.) |
Yes I expect that the new line copied from Words or Google Docs be converted into an empty paragraph. <p>
<br/>
</p> |
An empty paragraph is |
Yep, I think so. |
You could get that effect with a This is probably not something ProseMirror core will ever handle out-of-the-box, but I'm hoping someone will at some point set up a 'paste from word processors' plugin module that helps handle the weird markup that the various word processors put on the clipboard. |
Okey thanks for your help! |
When I past some content from Google docs or Words, a new line is converted into:
As you can see, we have two
br
instead of one.This can be easily reproduced by copy/paste this content into your basic example.
I tried to investigate the issue and identified that the additional
br
is created here.If you guide me, I can try to propose a PR.
The text was updated successfully, but these errors were encountered: