diff --git a/Resources/public/js/alloyeditor/plugins/paste.js b/Resources/public/js/alloyeditor/plugins/paste.js
index 700138645..e35bcc862 100644
--- a/Resources/public/js/alloyeditor/plugins/paste.js
+++ b/Resources/public/js/alloyeditor/plugins/paste.js
@@ -72,7 +72,10 @@ YUI.add('ez-alloyeditor-plugin-paste', function (Y) {
requires: 'clipboard',
init: function (editor) {
editor.pasteFilter = new CKEDITOR.filter({
- 'p h1 h2 h3 h4 h5 h6 ul li ol thead tbody th td tr': true,
+ 'p h1 h2 h3 h4 h5 h6 ul li ol thead th tbody tr': true,
+ 'td th': {
+ attributes: ['colspan', 'rowspan'],
+ },
'table': {
attributes: 'border',
},
diff --git a/Tests/js/alloyeditor/plugins/assets/ez-alloyeditor-plugin-paste-tests.js b/Tests/js/alloyeditor/plugins/assets/ez-alloyeditor-plugin-paste-tests.js
index 417ce48cc..586b7f107 100644
--- a/Tests/js/alloyeditor/plugins/assets/ez-alloyeditor-plugin-paste-tests.js
+++ b/Tests/js/alloyeditor/plugins/assets/ez-alloyeditor-plugin-paste-tests.js
@@ -244,6 +244,34 @@ YUI.add('ez-alloyeditor-plugin-paste-tests', function (Y) {
this._testPaste(code, expected, "The table border attribute should have been kept");
},
+ "Should keep colspan attribute on td": function () {
+ var code = '
',
+ expected = '';
+
+ this._testPaste(code, expected, "The table border attribute should have been kept");
+ },
+
+ "Should keep colspan attribute on th": function () {
+ var code = '',
+ expected = '';
+
+ this._testPaste(code, expected, "The table border attribute should have been kept");
+ },
+
+ "Should keep rowspan attribute on td": function () {
+ var code = '',
+ expected = '';
+
+ this._testPaste(code, expected, "The table border attribute should have been kept");
+ },
+
+ "Should keep rowspan attribute on th": function () {
+ var code = '',
+ expected = '';
+
+ this._testPaste(code, expected, "The table border attribute should have been kept");
+ },
+
"Should apply the paste filter after pastefromword cleanup": function () {
var code = 'Led Zeppelin - Black mountain side
',
expected = 'Led Zeppelin - Black mountain side
';