summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/wysiwyg/plugin/text.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_editor/static/src/js/wysiwyg/plugin/text.js')
-rw-r--r--addons/web_editor/static/src/js/wysiwyg/plugin/text.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/wysiwyg/plugin/text.js b/addons/web_editor/static/src/js/wysiwyg/plugin/text.js
index 9014b367fee..5337661fa76 100644
--- a/addons/web_editor/static/src/js/wysiwyg/plugin/text.js
+++ b/addons/web_editor/static/src/js/wysiwyg/plugin/text.js
@@ -106,7 +106,8 @@ var TextPlugin = AbstractPlugin.extend({
* @returns {Node[]}
*/
prepareClipboardData: function (clipboardData) {
- var $clipboardData = this._removeIllegalClipboardElements($(clipboardData));
+ var $html = $('<wrapper>' + clipboardData + '</wrapper>').contents();
+ var $clipboardData = this._removeIllegalClipboardElements($html);
var $all = $clipboardData.find('*').addBack();
$all.filter('table').addClass('table table-bordered');