-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Margin is not preserved when pasting from Word #651
Comments
@Zonciu Could you please provide more information about this issue, e.g. MS Word version, word file example with the text you're trying to paste and exact steps to reproduce? |
@beatadelura Word file: Here is the raw paste text I got
In pastfromword plugin's filter, normalizedStyles function removes 'text-indent' style from the raw text If I set the indent by righ click - paragraph - indent, the indent will be remove, If I make it to ignore the pastfromword filter, the raw text will be pasted and it shows very good, but I'm not sure will it cause bugs when I edit it in ckeditor. |
@Zonciu Thank you for details. In CKEditor, we support margins for text indentation, so |
Hi @beatadelura any news about this feature? thanks in advance ! |
@beatadelura please let us know if there is any news |
@celsowm @fikoborquez please add 👍 reaction to the first comment in this issue. This is the best way to show us your support for this feature request. |
For paragraphs, this feature is simple to implement. Word outputs paragraph margin as However, for lists, there are some difficulties. In HTML compared to Word, Top slider outputs Bottom slider outputs This is what a typical list in Word would look like. Currently we ignore both styles for lists in our editor, but if we try to create a list item with such styles, it would look broken. For lists:
To workaround this we could calculate proper margins and use padding to protect bullets from overlapping text. In contrast to lists in our editor, lists in Word, by default, have margins and indents. If a default list pasted from Word varied from a default list created in the editor, I would consider this buggy. On the other hand, normalizing them would be quite complex. As we don’t support margins in lists pasted from Word (some browsers doesn’t share all needed information for lists hierarchy) we could consider a bigger feature in future for adding a Word-like ruler with sliders for managing |
This feature was merged into |
Initial report touched two separate topics. Margins and text indentation. Though both looks like "text spacing thingy", the two are different as explained by @engineering-this. Thus purpose of this ticket was clarified to cover paragraphs margins. Text indentation has been extracted to #2198 feature request. I have updated the original report to reflect that. And for all of you watching this issue you can simply try it out in our major release (4.11.0) preview. |
Are you reporting a feature request or a bug?
Bug
Provide detailed reproduction steps (if any)
When I paste text from word, the paragraph margin is missing.
An example file could be reproduced with THIS file.
Expected result
"One level indent paragraph" and "Two level indent paragraph" should be indented.
Actual result
"One level indent paragraph" and "Two level indent paragraph" have no indentation.
Other details
The text was updated successfully, but these errors were encountered: