Implement full CryptDrive export
This commit is contained in:
17
www/code/export.js
Normal file
17
www/code/export.js
Normal file
@@ -0,0 +1,17 @@
|
||||
// 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([
|
||||
'/common/sframe-common-codemirror.js',
|
||||
], function (SFCodeMirror) {
|
||||
var module = {};
|
||||
|
||||
module.main = function (userDoc, cb) {
|
||||
var mode = userDoc.highlightMode || 'gfm';
|
||||
var content = userDoc.content;
|
||||
module.type = SFCodeMirror.getContentExtension(mode);
|
||||
cb(SFCodeMirror.fileExporter(content));
|
||||
};
|
||||
|
||||
return module;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user