Add zenuml support to mermaid
https://github.com/cryptpad/cryptpad/issues/1132
This commit is contained in:
parent
444d4da08f
commit
737e3ee6ff
3 changed files with 28980 additions and 2 deletions
|
@ -36,7 +36,8 @@ define([
|
|||
init: function () {
|
||||
require([
|
||||
'mermaid',
|
||||
], function (_Mermaid) {
|
||||
'/lib/mermaid/mermaid-zenuml.esm.min.js',
|
||||
], function (_Mermaid, zenuml) {
|
||||
console.debug("loaded mermaid");
|
||||
if (Mermaid.__stubbed) {
|
||||
Mermaid = _Mermaid;
|
||||
|
@ -48,7 +49,7 @@ define([
|
|||
});
|
||||
}
|
||||
|
||||
pluginLoaded.fire();
|
||||
Mermaid.registerExternalDiagrams([zenuml]).then(() => pluginLoaded.fire());
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
11
www/lib/mermaid/mermaid-zenuml.esm.min.js
vendored
Normal file
11
www/lib/mermaid/mermaid-zenuml.esm.min.js
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
define(function(){
|
||||
const n = "zenuml", e = /^\s*zenuml/, o = (t) => t.match(e) !== null, r = async () => {
|
||||
const { diagram: t } = await import("./zenuml-definition-b4b159b2.js");
|
||||
return { id: n, diagram: t };
|
||||
}, a = {
|
||||
id: n,
|
||||
detector: o,
|
||||
loader: r
|
||||
};
|
||||
return a;
|
||||
});
|
28966
www/lib/mermaid/zenuml-definition-b4b159b2.js
Normal file
28966
www/lib/mermaid/zenuml-definition-b4b159b2.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue