docsify-bpmnio

2.1.1 • Public • Published

docsify-bpmnio

This is a docsify plugin that can convert BPMN xml data to a picture in your docs.

First - write your drawio File Path in Your Markdown File

[filename](https://cdn.jsdelivr.net/npm/docsify-drawio/test.bpmn ':include :type=bpmn')

Second - Add these lines in your docsify html File.

!! It must put in the header section

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-bpmnio/style.css" />
<script src="https://cdn.jsdelivr.net/npm/docsify-bpmnio/viewer.min.js"></script>
<script src='https://cdn.jsdelivr.net/npm/docsify-bpmnio/bpmnio.js'></script>

Third - Add A Markdown render function in your $docsify.

window.$docsify = {
    // You just have to copy it to Your own html File
    markdown: {
      renderer: {

        code: function (bpmn, lang) {
          if (lang === 'bpmn') {
            if (window.bpmnioConverter) {
              return window.bpmnioConverter(bpmn)
            } else {
              return `<div class='bpmnio-code'>No bpmn.io converter</div>`
            }
          } else {
            return this.origin.code.apply(this, arguments);
          }
        }
      }
    },
  };

Package Sidebar

Install

npm i docsify-bpmnio

Weekly Downloads

0

Version

2.1.1

License

MIT

Unpacked Size

179 kB

Total Files

7

Last publish

Collaborators

  • gsdenys