This is a docsify plugin that can convert drawio xml Data to a picture in your docs.
npm install docsify-drawiomd
filename
`
Second - Add Some Script in your docsify html File.
!! It must put after your window.$docsify
`html
`
Third - Add A Markdown render function in your $docsify.
`js
window.$docsify = {
// You just have to copy it to Your own html File
markdown: {
renderer: {
code: function (code, lang) {
if (lang === 'drawio') {
if (window.drawioConverter) {
console.log('drawio 转化中')
return window.drawioConverter(code)
} else {
return
}
} else {
return this.origin.code.apply(this, arguments);
}
}
}
},
};
``