cherry-markdown
cherry-markdown copied to clipboard
[Feature request] Plantuml support just like mermaid
For most cases, mermaid should be enough, but for some people, they would like to use plantuml
** What does the proposed API look like** Just like mermaid:
import Cherry from 'cherry-markdown/dist/cherry-markdown.core';
const registerPlugin = async () => {
const [{ default: CherryPlantumlPlugin }, plantuml] = await Promise.all([
import('cherry-markdown/src/addons/cherry-code-block-plantuml-plugin'),
import('plantuml'),
]);
Cherry.usePlugin(CherryPlantumlPlugin, {
plantuml, // pass in plantuml object
});
};
registerPlugin().then(() => {
// Plug-in registration must be done before Cherry is instantiated
const cherryInstance = new Cherry({
id: 'markdown-container',
value: '# welcome to cherry editor!',
});
});
seems already done
But with a further look, seems it do not contain in dist folder~
@jiawei686 Do you have any ideas?
@jiawei686 Do you have any ideas? It seems plantuml addons were not included in dist folder
And here is my usage of plantuml (just like mermaid)
const [
{ default: CherryMermaidPlugin },
{ default: mermaid },
{ default: CherryPlantumlPlugin },
{ default: plantuml }
] = await Promise.all([
import('cherry-markdown/dist/addons/cherry-code-block-mermaid-plugin'),
import('mermaid'),
import('cherry-markdown/dist/addons/cherry-code-block-plantuml-plugin'),
import('plantuml')
]);
if (!window.hasPlugin) {
Cherry.usePlugin(CherryMermaidPlugin, {
mermaid
});
Cherry.usePlugin(CherryPlantumlPlugin, {
plantuml
});
window.hasPlugin = true;
}
So, I try to include that in the dist folder~ Or, is there another usage of plantuml without import these addons?
