-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #826 from ckeditor/t/423
Paste from word now respect enter_br mode
- Loading branch information
Showing
11 changed files
with
1,556 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+11.2 KB
tests/plugins/pastefromword/generated/_fixtures/Enter_BR/Enter_BR.docx
Binary file not shown.
2 changes: 2 additions & 0 deletions
2
tests/plugins/pastefromword/generated/_fixtures/Enter_BR/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
736 changes: 736 additions & 0 deletions
736
tests/plugins/pastefromword/generated/_fixtures/Enter_BR/word2016/chrome.html
Large diffs are not rendered by default.
Oops, something went wrong.
737 changes: 737 additions & 0 deletions
737
tests/plugins/pastefromword/generated/_fixtures/Enter_BR/word2016/firefox.html
Large diffs are not rendered by default.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
tests/plugins/pastefromword/generated/_fixtures/Enter_BR/word2016/ie11.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
2 changes: 2 additions & 0 deletions
2
tests/plugins/pastefromword/generated/_fixtures/Enter_BR/word2016/ie8.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} ) ); | ||
} )(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<textarea cols="80" id="editor1" name="editor1" rows="10"> | ||
Hello World | ||
</textarea> | ||
<script> | ||
var editor = CKEDITOR.replace( 'editor1', { | ||
enterMode: CKEDITOR.ENTER_BR, | ||
extraAllowedContent: 'p' | ||
} ); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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,enterkey,wysiwygarea,sourcearea | ||
|
||
---- | ||
1. Open [docx file](../generated/_fixtures/Enter_BR/Enter_BR.docx) in Microsft Word. | ||
1. Copy text from file and paste it to editor. | ||
1. Check Source in editor. | ||
|
||
**Expected:** There is no `<p>` tags in source. Every paragraph is replaced with `<br />`. | ||
|
||
**Unexpected:** There are `<p>` tag after paste. | ||
|
||
|