Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding mermaid.js support via markdown-it. #2755

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

dessalines
Copy link
Member

EDIT: nm, this doesn't work currently because the library doesn't support ESM :

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/xxx/git/lemmy-ui/node_modules/.pnpm/[email protected]/node_modules/mermaid/dist/mermaid.core.mjs not supported.

@Nutomic
Copy link
Member

Nutomic commented Oct 16, 2024

This is for some sort of diagram rendering? I would rather not add that because its pretty much out of scope, and then all other frontends and apps would also have to add support for this feature.

@dessalines
Copy link
Member Author

dessalines commented Oct 16, 2024

Yep. Here's some more cool ones that hedgedoc for example supports in their markdown.

I think its fine if we have these markdown add-ons, as long as its understood that we won't maintain the libraries ourselves, and that any apps will have to do their own work supporting them. It could also be kind of a cool incentive / project for people to start adding these renderers to other platforms besides the web, like android / iOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Mermaid.js diagrams
2 participants