mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-17 03:20:02 +00:00
Fix: add twEditor attribute to paste events handled by codemirror (#7281)
This commit is contained in:
parent
8d39ce95eb
commit
5bce35d90b
@ -259,7 +259,7 @@ DropZoneWidget.prototype.handlePasteEvent = function(event) {
|
||||
}
|
||||
};
|
||||
// Let the browser handle it if we're in a textarea or input box
|
||||
if(["TEXTAREA","INPUT"].indexOf(event.target.tagName) == -1 && !event.target.isContentEditable) {
|
||||
if(["TEXTAREA","INPUT"].indexOf(event.target.tagName) == -1 && !event.target.isContentEditable && !event.twEditor) {
|
||||
var self = this,
|
||||
items = event.clipboardData.items;
|
||||
// Enumerate the clipboard items
|
||||
|
@ -220,9 +220,15 @@ function CodeMirrorEngine(options) {
|
||||
}
|
||||
});
|
||||
this.cm.on("paste",function(cm,event) {
|
||||
event["twEditor"] = true;
|
||||
self.widget.handlePasteEvent.call(self.widget,event);
|
||||
});
|
||||
} else {
|
||||
this.cm.on("paste",function(cm,event){
|
||||
event["twEditor"] = true;
|
||||
});
|
||||
}
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user