-
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
Paste from word now respect enter_br mode #826
Changes from 6 commits
55a4b89
585c128
e3f604c
30720e8
53312b8
019a993
822b246
cdd82c6
71fd4c2
ce33425
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<strong><em>Paste from Word<br />Next</em></strong><br /> | ||
<strong><em>Totally new</em></strong> |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><i style='mso-bidi-font-style:normal'>Paste from word<br> | ||
Next<o:p></o:p></i></b></p> | ||
|
||
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><i style='mso-bidi-font-style:normal'>Totally new<o:p></o:p></i></b></p> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<font color="#000000" face="Times New Roman" size="3"> | ||
|
||
</font><p style="margin: 0in 0in 8pt;"><b style="mso-bidi-font-weight: normal;"><i style="mso-bidi-font-style: normal;"><font face="Calibri"><font color="#000000" size="3">Paste from word<br></font><font color="#000000" size="3"> | ||
Next</font></font></i></b></p><font color="#000000" face="Times New Roman" size="3"> | ||
|
||
</font><p style="margin: 0in 0in 8pt;"><b style="mso-bidi-font-weight: normal;"><i style="mso-bidi-font-style: normal;"><font color="#000000" face="Calibri" size="3">Totally new</font></i></b></p><font color="#000000" face="Times New Roman" size="3"> | ||
|
||
</font> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<P style="MARGIN: 0in 0in 8pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><I style="mso-bidi-font-style: normal"><FONT size=3><FONT color=#000000>Paste from word<BR>Next<o:p></o:p></FONT></FONT></I></B></P> | ||
<P style="MARGIN: 0in 0in 8pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><I style="mso-bidi-font-style: normal"><FONT size=3><FONT color=#000000>Totally new<o:p></o:p></FONT></FONT></I></B></P> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* bender-tags: clipboard,pastefromword */ | ||
/* jshint ignore:start */ | ||
/* bender-ckeditor-plugins: pastefromword,ajax,basicstyles,toolbar */ | ||
/* jshint ignore:end */ | ||
/* bender-include: _lib/q.js,_helpers/promisePasteEvent.js,_helpers/assertWordFilter.js,_helpers/createTestCase.js */ | ||
/* bender-include: _helpers/createTestSuite.js */ | ||
/* global createTestSuite */ | ||
|
||
( function() { | ||
'use strict'; | ||
|
||
var config = { | ||
language: 'en', | ||
colorButton_normalizeBackground: false, | ||
allowedContent: 'p strong em', | ||
enterMode: CKEDITOR.ENTER_BR | ||
}; | ||
|
||
bender.editor = { | ||
config: config | ||
}; | ||
|
||
bender.test( createTestSuite( { | ||
browsers: [ | ||
'chrome', | ||
'firefox', | ||
'ie11', | ||
'ie8' | ||
], | ||
wordVersions: [ | ||
'word2016' | ||
], | ||
tests: { | ||
'Enter_BR': true | ||
}, | ||
|
||
compareRawData: false | ||
} ) ); | ||
} )(); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<textarea cols="80" id="editor1" name="editor1" rows="10"> | ||
Hello World | ||
</textarea> | ||
<script> | ||
var editor = CKEDITOR.replace( 'editor1', { | ||
enterMode: CKEDITOR.ENTER_BR | ||
} ); | ||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@bender-tags: bug, 4.7.3, word | ||
@bender-ui: collapsed | ||
@bender-ckeditor-plugins: pastefromword,toolbar,basicstyles,wysiwygarea,sourcearea | ||
|
||
---- | ||
1. Open [docx file](https://github.com/ckeditor/ckeditor-dev/blob/master/tests/plugins/pastefromword/generated/_fixtures/Enter_BR/Enter_BR.docx) in Microsft Word. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's better to use relative path as this one is not working currently. |
||
1. Copy text from file and paste it to editor. | ||
1. Check Source in editor. | ||
|
||
**Expected:** There is no `<p>` tags in source. Every pparagraph is replaced wit `<br />`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please, fix typos. |
||
|
||
**Unexpected:** There are `<p>` tag after paste. | ||
|
||
|
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'm not sure if it's correct fixture for Firefox. It should like like the one from Chrome, containing all HTML as Firefox also supports fetching HTML from native
dataTransfer
.