this.clean.removeSpans = function(html) {
return html;
};
+
+ var mpGetCurrentType = this.clean.getCurrentType;
+ this.clean.getCurrentType = (function(html, insert) {
+ var data = mpGetCurrentType.call(this, html, insert);
+
+ if (this.utils.isCurrentOrParent(['kbd'])) {
+ data.inline = false;
+ data.block = false;
+ data.encode = true;
+ data.pre = true;
+ data.paragraphize = false;
+ data.images = false;
+ data.links = false;
+ }
+
+ return data;
+ }).bind(this);
}
}
};
if (this.detect.isWebkit() && clipboard.items.length > 1) {
file = clipboard.items[1].getAsFile();
cancelPaste = true;
- e.preventDefault();
+
+ if (file !== null) {
+ e.preventDefault();
+ }
}
if (file === null) {
var transparentGif = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
var mpInsert = this.paste.insert;
this.paste.insert = (function(html, data) {
+ if (isKbd) data.pre = true;
+
if (data.pre) {
return mpInsert.call(this, html, data);
}