1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-08-04 12:27:28 +02:00
This commit is contained in:
Kushagra Gour
2016-11-16 13:15:18 +05:30
parent e0a5335e5d
commit 3633cbc384

View File

@@ -625,6 +625,27 @@
}
});
$('#js-code-side').addEventListener('dragover', function(e) {
console.log(e);
return false;
});
$('#js-code-side').addEventListener('drop', function(e) {
var f = e.dataTransfer.files[0];
var reader = new FileReader();
// Closure to capture the file information.
reader.onload = (function(theFile) {
return function(e) {
var code = e.target.result;
// editor.cm.html===========
};
})(f);
// Read in the image file as a data URL.
reader.readAsText(f);
return false;
});
chrome.storage.local.get({
layoutMode: 1,
code: ''