-
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
Fix for pasting lists from OneNote #863
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor things. On top of that:
I'd rather like to have some sort original fixture in OneNote's format. But AFAICS OneNote doesn't provide the feature to save stuff locally? Can we reproduce the exact same markup using Word? Then we could store a .docx
.
( function() { | ||
'use strict'; | ||
|
||
var config = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to extract config here, just inline it - we're doing it very often and it's well readable.
@@ -0,0 +1,38 @@ | |||
/* bender-tags: clipboard,pastefromword */ | |||
/* jshint ignore:start */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no reason to ignore this line in JSHint.
var config = { | ||
language: 'en', | ||
colorButton_normalizeBackground: false, | ||
allowedContent: 'p ul li' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than define explicitly allowedContent, just add list
plugin, and that will be fine.
'OneNote' | ||
], | ||
tests: { | ||
'OneNote': true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test case name need to say what it's doing. In this case we're working with lists.
I've analysed OneNote and Word. I wasn't able to reproduce similar situation in case of Word. Word2016 & Word2013:
OneNote:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, ok we can do without the original file.
Subdirs in fixtures are lowercased (like word2013, word2016 etc) thus it should be onenote. I have fixed that.
However there's a missing manual test 🙀
- remove jshint ignore comment - change config for tests - add list plugin instead of using allowedContent - rename test suite
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this pull request?
Bug fix
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
What changes did you make?
correctLevelShift
process lists. To append elements at the end instead of always at the beginning.close #796