Add attachment support to Mermaid Diagrams Viewer

There are numerous diagramming plugins in the app store that can do a lot of elaborate things, but this first-party viewer is really everything we are looking for EXCEPT that we would like to be able to render the diagrams from an attachment on the page instead of only via a code block on the page. That would seem to give all the benefits of “keeping the code close” but not having to expose it on the page content itself for users who are digesting the information and don’t need to know the syntax to reproduce the diagram. Thanks for your consideration.

EDIT: I did notice after posting this that the viewer renders nothing from the Confluence Android app, just the phrase “Error loading the extension!”

Hi @k3davis! Thanks for raising this request! Have you considered hiding the code block inside the expand? IMO this archives the goal of hiding the code just as well if not better, as the code remains available for search and collaborative editing. Are there any other benefits of using attachments?

Yeah, I’m aware of this issue with “Error loading the extension!”, I suspect this is a limitation of the mobile app + forge platform, but maybe I can fix it on my end. This is already on my radar, but I can’t promise an ETA yet.

1 Like

Hi @dhreben , thanks for your work on this app. I understand you’re probably doing this in your spare time, which I imagine like most devs is hard to come by :smile:

This may come down just to personal preference, but we ended up going with the “cheapest not-free” alternative here because much of this documentation isn’t developer focused and having the diagram source on the page isn’t helpful to the users, though we did use the expand method at first. There are some quite elaborate ones too of course but the simplicity of this one is great, it just forced us to put a lot of expands everywhere.

For what it’s worth (and you may well already be aware of this), the Mermaid for Confluence app seems to just let us embed the code in the page without showing it either on the page or needing to attach. This is probably not ideal for the use case you built it for, but it meets our needs just a little bit better. (It also works fine on mobile.)

1 Like