You can access RED.utils.renderMarkdown which should render a mermaid code fence. I'm not at computer to see if we expose mermaid for direct rendering.
I think that would be wise. If we ever swap the renderer or it's API changes, your node would break (and you'd have to do some version tests to be backwards compatible)
It's not so much being able to access the methods, as it is if we should be. RED.utils I am ok with - as it's documented in the API for developers, but using methods from RED.editor was it intended to be used by Node Developers?
Evan the tray shown in my screenshot, I wanted to make sure was ok to use (it is ).
After thinking, I’m going to include the package myself and do the esm import in my client editor bootstrap code - this then shouldn’t interfere with Node RED.
Try to bundle it using rollup, vite or the new rolldown. I saw that mermaid is esm, and possibly good support for tree shaking. This means that after tree shaking you may end up using a few kbs of the whole mermaid library.