Problem/Motivation

When I view a content model diagram, I would like to be able to copy the mermaid output so that I could use it elsewhere. When viewing mermaid diagrams on github there is a copy control that appears onscreen.
example https://github.com/department-of-veterans-affairs/va.gov-cms/blob/main/R...

It would be very useful to have that appear on our entity relationship diagrams.

Steps to reproduce

  1. visit /admin/reports/content-model/entity-diagram
  2. Choose an entity that has a lot of entity references
  3. Notice there is no way to copy the mermaid content

Proposed resolution

I am not sure if github is using an additional library to expose this, or if it is part of the mermaid library and we do not have it enabled.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#4 mermaid-copy.png147.6 KBswirt

Comments

swirt created an issue. See original summary.

swirt’s picture

Component: Code » Diagram

  • swirt committed 4f286907 on 1.0.x
    Issue #3346856: Diagram: add ability to copy mermaid code
    
swirt’s picture

Issue summary: View changes
Status: Active » Fixed
StatusFileSize
new147.6 KB

Any of the mermaid diagrams for entity references or workflow not contain a details block to expose the raw mermaid code for copy and paste.
copyable mermaid code in a details block

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.