Make plantuml server url configurable
chbndrhnns opened this issue · comments
Johannes Rueschel commented
In case I would like to use a private instance of a plantuml server, I would like to be able to configure the markdown plugin to use a custom URL.
G Munguia commented
Hi! Thanks your using this plugin =)
It should be possible to do what you want using the generateSource
option:
function customSrcGenerator (umlCode) {
return `https://your.server/plant-uml/${yourEncodeFunction(umlCode)}`;
}
var md = require('markdown-it')()
.use(require('markdown-it-plantuml'), { generateSource: customSrcGenerator });
Let me know how it goes!
Johannes Rueschel commented
I wanted to suggest this feature to the Boostnote IO developers and now I posted your example to the corresponding issue.
G Munguia commented
Great! I have updated the docs to include the example.