Error [ERR_REQUIRE_ESM]: Must use import to load ES Module

@TotallyInformation Version 0.1.1 from github (TotallyInformation/node-red-contrib-static-markdown) is also working for me. Great Job !!

I guess you refer to the mermaid plug-ins. Indeed I also gave this a shot without success.

... but thanks to this I (re)discovered draw.io which is far more powerful tool than mermaid and those draw.io diagrams (in svg or png format) can be embedded like any other png/svg file in the markdown files without requiring any extra plug-in.

... There is even a visual studio code extension Draw.io integration that allows to directly edit your draw.io png/svg file from visual studio code (this requires that it must have suffix .drawio.png or .drawio.svg).

Ah, great, I'll publish that then. Thanks a lot for your help and input.

Yes.

Yes, that is a useful tool - however, it isn't text-driven which is the advantage of tools like Mermaid, PlantUML, etc. They also allow data-driven diagrams to be generated more easily.

Because Mermaid covers several tools, it would be ideal and really fits in with the concepts of Markdown. It is frustrating that so many people are writing stuff for Node.js that ends up needing a build step. If I had time, I'd do some experiments with them but unfortunately I don't.

1 Like

Now published to npmjs, should appear in Flows & the pallet manager shortly.

1 Like

I'm happy to say that I've finally stumbled upon a library that will successfully integrate Mermaid (and PlantUML) without a build step!

It does, however, require a couple of lines adding to your template .hbs file.

Still, a small price to pay for being able to have loads of different types of diagrams in your markdown.

I'll push a new dev version to master when I get a chance.

1 Like

Updated and pushed to master. There is an example template and .md file that shows some use of both PlantUML and Mermaid based on the examples from their web sites.

UPDATE: Wow! I didn't realise that PlantUML had come on such a long way. Here is one of their examples that I reproduce in my diag.md example file:

This is now also pushed to the GitHub master. v0.2.0 will be published shortly.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.