paste text/plain instead of html in Ox.EditableContent
This commit is contained in:
parent
bc792641e6
commit
6e6da8e000
1 changed files with 8 additions and 0 deletions
|
@ -87,6 +87,14 @@ Ox.EditableContent = function(options, self) {
|
|||
},
|
||||
paste: function(e) {
|
||||
Ox.print('PASTE', e);
|
||||
if (e.originalEvent.clipboardData && e.originalEvent.clipboardData.getData) {
|
||||
Ox.print('TYPES', e.originalEvent.clipboardData.types);
|
||||
var value = e.originalEvent.clipboardData.getData('text/plain');
|
||||
document.execCommand('insertHTML', false, value);
|
||||
e.originalEvent.stopPropagation();
|
||||
e.originalEvent.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
})
|
||||
.bindEvent({
|
||||
|
|
Loading…
Reference in a new issue