mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-25 12:47:40 +00:00
Drag and drop images in the editor to import and insert (#5699)
* Merge * Clean up * More clean up * Ensure image import works when type is not set, clean up post import actions * Removed spurious new line * For non image files insert a tiddler link * Added documentation for new settings and features
This commit is contained in:
@@ -205,4 +205,16 @@ function parseJSONTiddlers(json,fallbackTitle) {
|
||||
return data;
|
||||
};
|
||||
|
||||
exports.dragEventContainsFiles = function(event) {
|
||||
if(event.dataTransfer.types) {
|
||||
for(var i=0; i<event.dataTransfer.types.length; i++) {
|
||||
if(event.dataTransfer.types[i] === "Files") {
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user