cryptpad/www/kanban/export.js

19 lines
450 B
JavaScript
Raw Normal View History

2018-10-18 16:50:38 +00:00
// This file is used when a user tries to export the entire CryptDrive.
// Pads from the code app will be exported using this format instead of plain text.
define([
], function () {
var module = {
ext: '.json'
};
2018-10-18 16:50:38 +00:00
module.main = function (userDoc, cb) {
var content = userDoc.content;
cb(new Blob([JSON.stringify(content, 0, 2)], {
type: 'application/json',
}));
};
return module;
});