Skip to content

Latest commit

 

History

History
45 lines (41 loc) · 1.92 KB

File metadata and controls

45 lines (41 loc) · 1.92 KB

Mermaid chart confluence plugin

Installation

  1. Set up environment variables:
NODE_ENV=production
MC_CLIENT_ID=839d35ba-cfee-4c98-8cee-88f2d2caa0c4
MC_BASE_URL=https://test.mermaidchart.com
  1. Configure application with config.json file (set up domain and DB connection) for production env
  2. Run npm run start
  3. How to add plugin into atlassian marketplace

Configure diagram selection page

  1. Attach plugin js to the page
<script src="https://[confluence plugin domain]/js/plugin.js"></script>
  1. Call function window.CP.saveData(data) on diagram selection (iframe will be closed automatically after execution). Example
window.CP.saveData({
    documentID: 'c2f481f9-433f-4491-a9d4-811d7150122f',
    major: '0',
    minor: '1',
});
  1. Call function window.CP.cancel() if you want close iframe without selecting diagram
  2. Function window.CP.getData() returns current selection diagram data.
  3. Example file /example/index.html

Development

  1. Configure your local environment with following guide (steps 1-3)
  2. Add a credentials.json (copy from sample) file in your app directory with your information:
  1. Set up environment variables:
MC_CLIENT_ID=839d35ba-cfee-4c98-8cee-88f2d2caa0c4
MC_BASE_URL=https://test.mermaidchart.com
  1. Start application npm run start