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

Remove empty paragraphs when pasting from Word #9365

Closed
marcellofuschi opened this issue Mar 26, 2021 · 7 comments
Closed

Remove empty paragraphs when pasting from Word #9365

marcellofuschi opened this issue Mar 26, 2021 · 7 comments
Labels
pending:feedback This issue is blocked by necessary feedback. resolution:expired This issue was closed due to lack of feedback. type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@marcellofuschi
Copy link
Contributor

📝 Provide a description of the improvement

How the feature works now and what you'd like to change?

When you paste from Word a text which has paragraphs separated by empty paragraphs, the editor retains those empty paragraphs while applying margin to all of them. This means the (real) paragraphs are spaced more than intended because on Word paragraphs have 0 margin by default.

Here's a video showing the current wrong behaviour:

screen_recording.mp4

If you'd like to see this improvement implemented, add a 👍 reaction to this post.

@marcellofuschi marcellofuschi added the type:improvement This issue reports a possible enhancement of an existing feature. label Mar 26, 2021
@LukaszGudel
Copy link
Contributor

Hello, thank you for your suggestion but I'm afraid that the feature that you are describing might cause unexpected behaviour for other users that would like to preserve empty paragraphs when pasting from other sources like Word.

Please, bear in mind that content you see inside the editor is presented as HTML and you can simply create a css rule to remove those margins or change line-height value on <p> tags if you need to match your content with Word document visually.

Please, let me know if my suggestion is fixing your issue.

@LukaszGudel LukaszGudel added the pending:feedback This issue is blocked by necessary feedback. label Mar 30, 2021
@marcellofuschi
Copy link
Contributor Author

marcellofuschi commented Mar 30, 2021

I think that there are situations in which we can assume a Word user does not need to preserve empty paragraphs when pasting from Word, because when you intend to create a new paragraph in Word you're actually not creating two of them but three, using one of them to separate the two.
Since the user just wanted to add a new paragraph (instead of going to a new line in the same one) they can't be aware that they created an empty paragraph in between the two. Hence, they wouldn't expect that empty paragraph to appear after the paste from Word to the editor.

If you try Medium's editor with the same Word file that I used in the video (in the first post), you can see that they remove the empty paragraph when you paste the content.

@marcellofuschi
Copy link
Contributor Author

Hi! Any updates on this?

@jswiderski
Copy link

This is something to check but perhaps instead of removing, style retention will solve this problem - #10577

@CKEditorBot
Copy link
Collaborator

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

@CKEditorBot
Copy link
Collaborator

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

@CKEditorBot
Copy link
Collaborator

We've closed your issue due to inactivity over the last year. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).

@CKEditorBot CKEditorBot added resolution:expired This issue was closed due to lack of feedback. and removed status:stale labels Jan 15, 2024
@CKEditorBot CKEditorBot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending:feedback This issue is blocked by necessary feedback. resolution:expired This issue was closed due to lack of feedback. type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

No branches or pull requests

4 participants