Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Edit > Copy the diagram generated by Mermaid when using the Mermaid plugin in IntelliJ IDE

I am using the Mermaid diagramming and charting tool to generate an ERD diagram. I access Mermaid within IntelliJ IDE through the Mermaid plugin provided by JetBrains.

I am using the dual-pane mode, with my markup text on the left, and the generated diagram visible on the right side.

👉🏽 How does one export, print, or copy that generated diagram?

I can find no menus, buttons, or context menu items to accomplish these common tasks.

like image 903
Basil Bourque Avatar asked Oct 11 '25 23:10

Basil Bourque


1 Answers

The Comment by Jacky Liu confirms there is no such feature.

Print to PDF

As a workaround for the lack of a Edit > Copy command, you can on a Mac:

  1. Click once in the empty background of the diagram.
  2. Choose File > Print.
  3. Navigate the Print dialogs to generate a PDF document.
  4. Open that PDF in an app such as Preview, and copy.

mermaid-cli

Another avenue is using the mermaid-cli command-line interface tool to generate an svg/png/pdf file .

like image 130
Basil Bourque Avatar answered Oct 16 '25 11:10

Basil Bourque