intellij-ideacopymermaid

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.


Solution

  • 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 .