diff --git a/core/modules/widgets/dropzone.js b/core/modules/widgets/dropzone.js index 729ad26ed..82fe3a51b 100644 --- a/core/modules/widgets/dropzone.js +++ b/core/modules/widgets/dropzone.js @@ -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 diff --git a/plugins/tiddlywiki/codemirror/engine.js b/plugins/tiddlywiki/codemirror/engine.js index 4904d1ac2..e775e1c95 100755 --- a/plugins/tiddlywiki/codemirror/engine.js +++ b/plugins/tiddlywiki/codemirror/engine.js @@ -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; + }); } +; } /*