Skip to content

Commit

Permalink
Merge branch 'master' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Jan 8, 2015
2 parents df5a9dc + 2a26ca2 commit e75f82a
Show file tree
Hide file tree
Showing 18 changed files with 180 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Expand Up @@ -36,9 +36,11 @@ Other Changes:

Fixed Issues:

* [#12777](http://dev.ckeditor.com/ticket/12777): Fixed: The `table-layout` CSS property should be reset by skins. Thanks to [vita10gy](https://github.com/vita10gy)!
* [#12747](http://dev.ckeditor.com/ticket/12747): [IE8-10] Fixed: Opening a drop-down for a specific selection when editor is maximized results in incorrect drop-down panel position.
* [#12735](http://dev.ckeditor.com/ticket/12735): Fixed: [`Config.fillEmptyBlocks`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fillEmptyBlocks) should only apply when outputting data.
* [#12750](http://dev.ckeditor.com/ticket/12750): Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword): strikethrough and underscore should have the same color as font.
* [#10032](http://dev.ckeditor.com/ticket/10032): Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword) filter is executed for every paste after using the button.

## CKEditor 4.4.6

Expand Down
2 changes: 1 addition & 1 deletion bender.js
Expand Up @@ -33,7 +33,7 @@ var config = {
// Latest of the old API (1.8.3)
// Latest of the 1.* branch
// Latest of the 2.* branch
jquery: [ '1.8.3', '1.11.1', '2.1.1' ]
jQuery: [ '1.8.3', '1.11.1', '2.1.1' ]
},

'Core': {
Expand Down
2 changes: 2 additions & 0 deletions plugins/pastefromword/plugin.js
Expand Up @@ -81,6 +81,8 @@
else if ( !editor.config.pasteFromWordPromptCleanup || ( forceFromWord || confirm( editor.lang.pastefromword.confirmCleanup ) ) ) // jshint ignore:line
data.dataValue = CKEDITOR.cleanWord( mswordHtml, editor );

// Reset forceFromWord.
forceFromWord = 0;
} );

// The cleanup rules are to be loaded, we should just cancel
Expand Down
10 changes: 8 additions & 2 deletions skins/kama/reset.css
Expand Up @@ -112,8 +112,14 @@ http://docs.cksource.com/CKEditor_4.x/Skin_SDK/Reset
border: 2px groove #E0DFE3;
}

.cke_reset_all select {
.cke_reset_all select
{
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
}

.cke_reset_all table
{
table-layout: auto;
}
8 changes: 7 additions & 1 deletion skins/moono/reset.css
Expand Up @@ -113,8 +113,14 @@ http://docs.cksource.com/CKEditor_4.x/Skin_SDK/Reset
border: 2px groove #E0DFE3;
}

.cke_reset_all select {
.cke_reset_all select
{
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}

.cke_reset_all table
{
table-layout: auto;
}
7 changes: 6 additions & 1 deletion tests/plugins/magicline/widgets.js
Expand Up @@ -6,6 +6,11 @@
'use strict';

var tools = widgetTestsTools,
/*nestedTplAc = new CKEDITOR.template( '<div id="{id}" class="u">' +
'<div class="nested">' +
'<blockquote>u</blockquote>' +
'</div>' +
'</div>' ),*/
nonEditTpl = new CKEDITOR.template( '<div id="{id}" class="w">' +
'<div class="wa">wa</div>' +
'<div class="wb">wb</div>' +
Expand Down Expand Up @@ -792,4 +797,4 @@
*/
} );
} )();
} )();
80 changes: 80 additions & 0 deletions tests/plugins/pastefromword/_helpers/resetforcefromword.js
@@ -0,0 +1,80 @@
/* exported testScenario */

'use strict';

// Scenario is a sequence (array) of pasted to be fired. True (1) means paste from word, false (0) means regular paste.
function testScenario( scenario, filterPath ) {
bender.editor = {
config: {
pasteFromWordCleanupFile: filterPath
}
};

var stub;

bender.test( {
tearDown: function() {
if ( stub ) {
stub.restore();
stub = null;
}
},

// #10032
'test reset forceFromWord': function() {
var editor = this.editor,
pasteHtml = '<p>foo</p>',
i = 0;


stub = sinon.stub( editor, 'getClipboardData', function( options, callback ) {
if ( callback ) {
callback( { dataValue: pasteHtml } );
}
} );

editor.once( 'paste', paste, null, null, 999 );

firePaste( editor, scenario[ i ] );

wait();

function paste( evt ) {
resume( function() {
assertPaste( evt.data.dataValue, scenario[ i ], i );

if ( i == scenario.length ) {
return;
}

editor.once( 'paste', paste, null, null, 999 );

i++;

firePaste( editor, scenario[ i ] );

wait();
} );
}

function firePaste( editor, fromWord ) {
if ( fromWord ) {
editor.execCommand( 'pastefromword' );
} else {
editor.fire( 'paste', { dataValue: pasteHtml } );
}
}

function assertPaste( value, fromWord, index ) {
var expectedFromWord = 'ok',
expectedNotFromWord = '<p>foo</p>';

if ( fromWord ) {
assert.areSame( expectedFromWord, value, 'Paste nr ' + index + ' should be from word.' );
} else {
assert.areSame( expectedNotFromWord, value, 'Paste nr ' + index + ' should NOT be from word.' );
}
}
}
} );
}
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,8 @@
/* bender-tags: editor,unit,clipboard */
/* bender-ckeditor-plugins: pastefromword */
/* bender-include: _helpers/resetforcefromword.js */
/* global testScenario */

'use strict';

testScenario( [ 1, 0, 1, 0, 0 ], '%TEST_DIR%_assets/customfilter.js' );
@@ -0,0 +1,8 @@
/* bender-tags: editor,unit,clipboard */
/* bender-ckeditor-plugins: pastefromword */
/* bender-include: _helpers/resetforcefromword.js */
/* global testScenario */

'use strict';

testScenario( [ 0, 1, 0, 1, 1, 0 ], '%TEST_DIR%_assets/customfilter.js' );
18 changes: 18 additions & 0 deletions tests/tickets/12777/1.html
@@ -0,0 +1,18 @@
<head>
<style>
table
{
table-layout: fixed;
}
</style>
</head>

<body>
<div id="editor">
<p>Foo</p>
</div>

<script>
CKEDITOR.replace( 'editor' );
</script>
</body>
10 changes: 10 additions & 0 deletions tests/tickets/12777/1.md
@@ -0,0 +1,10 @@
@bender-tags: 4.4.7, tc
@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea, toolbar, image

1. Click the image button.

Expected: the dialog's layout is OK:

* the preview panel should be fully visible,
* the *lock* and *refresh* icons are close (<20px) to the inputs.
20 changes: 20 additions & 0 deletions tests/tickets/12777/2.html
@@ -0,0 +1,20 @@
<head>
<style>
table
{
table-layout: fixed;
}
</style>
</head>

<body>
<div id="editor">
<p>Foo</p>
</div>

<script>
CKEDITOR.replace( 'editor', {
skin: 'kama'
} );
</script>
</body>
10 changes: 10 additions & 0 deletions tests/tickets/12777/2.md
@@ -0,0 +1,10 @@
@bender-tags: 4.4.7, tc
@bender-ui: collapsed
@bender-ckeditor-plugins: wysiwygarea, toolbar, image

1. Click the image button.

Expected: the dialog's layout is OK:

* the preview panel should be fully visible,
* the *lock* and *refresh* icons are close (<20px) to the inputs.

0 comments on commit e75f82a

Please sign in to comment.