mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Implement diagram export
https://github.com/cryptpad/cryptpad/issues/1274
This commit is contained in:
parent
bdad5e4d1b
commit
41c691bfde
14
www/diagram/export.js
Normal file
14
www/diagram/export.js
Normal file
@ -0,0 +1,14 @@
|
||||
define([
|
||||
'/components/x2js/x2js.js',
|
||||
], function (
|
||||
X2JS) {
|
||||
const x2js = new X2JS();
|
||||
const jsonContentAsXML = (content) => x2js.js2xml(content);
|
||||
|
||||
return {
|
||||
main: function(userDoc, cb) {
|
||||
delete userDoc.metadata;
|
||||
cb(jsonContentAsXML(userDoc), '.drawio');
|
||||
}
|
||||
};
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user