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

Added config option that allows to preserve zero margins #2952

Merged
merged 15 commits into from
Apr 25, 2019
Merged

Added config option that allows to preserve zero margins #2952

merged 15 commits into from
Apr 25, 2019

Conversation

engineering-this
Copy link
Contributor

@engineering-this engineering-this commented Mar 12, 2019

What is the purpose of this pull request?

New feature

Does your PR contain necessary tests?

All patches which change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.

This PR contains

  • Unit tests
  • Manual tests

What changes did you make?

Updated PFW filter to keep margin-*:0 style when config.pasteFromWord_keepEmptyMargins=true.

Closes #2935

Important note: there is still ongoing discussion in #2935 until we fully agree if this solution is what we want this shouldn't be reviewed.

@f1ames
Copy link
Contributor

f1ames commented Apr 11, 2019

Rebased on latest major.

Copy link
Contributor

@f1ames f1ames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename config to keepZeroMargins since keepEmptyMarigns is not precise enough and empty may be interpreted in many ways. Also it will be easier to find when using phrases like zero margin in our API docs.

Could you also add fixtures for Safari?

CHANGES.md Outdated Show resolved Hide resolved
plugins/pastefromword/filter/default.js Outdated Show resolved Hide resolved
plugins/pastefromword/filter/default.js Outdated Show resolved Hide resolved
plugins/pastefromword/filter/default.js Outdated Show resolved Hide resolved
tests/plugins/pastefromword/manual/keepemptymargins.md Outdated Show resolved Hide resolved
f1ames and others added 3 commits April 12, 2019 17:08
Co-Authored-By: engineering-this <k.litwinowicz@cksource.com>
Co-Authored-By: engineering-this <k.litwinowicz@cksource.com>
Co-Authored-By: engineering-this <k.litwinowicz@cksource.com>
@engineering-this engineering-this self-assigned this Apr 12, 2019
Copy link
Contributor

@f1ames f1ames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

I'm just missing Safari fixtures (requested in #2952 (review)). Unless, Safari fixtures are identical as Chrome or Firefox one and can be skipped.

@f1ames f1ames removed their assignment Apr 15, 2019
@engineering-this engineering-this self-assigned this Apr 15, 2019
@engineering-this
Copy link
Contributor Author

I was sure I've added Safari fixtures, apparently I was wrong.

@f1ames f1ames self-assigned this Apr 25, 2019
Copy link
Contributor

@f1ames f1ames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@f1ames f1ames merged commit 0b1fa16 into major Apr 25, 2019
@CKEditorBot CKEditorBot deleted the t/2935 branch April 25, 2019 11:23
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

Successfully merging this pull request may close these issues.

Paste From Word (PFW) filter removes margin-top, margin-bottom
2 participants