1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-15 06:47:25 +00:00

Revised fix for IE drag/drop issue #252

Also improve browser drag/drop inter-op a tiny bit
This commit is contained in:
David Jade
2013-12-13 03:12:56 -08:00
parent 80e0714c0d
commit 0984e9322f
2 changed files with 9 additions and 7 deletions

View File

@@ -117,6 +117,9 @@ DropZoneWidget.prototype.importData = function(dataTransfer) {
};
DropZoneWidget.prototype.importDataTypes = [
{type: "text/vnd.tiddler", convertToFields: function(data) {
return JSON.parse(data);
}},
{type: "URL", convertToFields: function(data) {
// check for tiddler data URI
var match = decodeURI(data).match(/^data\:text\/vnd\.tiddler,(.*)/i);
@@ -128,15 +131,12 @@ DropZoneWidget.prototype.importDataTypes = [
};
}
}},
{type: "Text", convertToFields: function(data) {
{type: "text/plain", convertToFields: function(data) {
return {
text: data
};
}},
{type: "text/vnd.tiddler", convertToFields: function(data) {
return JSON.parse(data);
}},
{type: "text/plain", convertToFields: function(data) {
{type: "Text", convertToFields: function(data) {
return {
text: data
};