gmunguia / markdown-it-plantuml

:herb: :book: plantuml diagrams in your markdown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make plantuml server url configurable

chbndrhnns opened this issue · comments

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.

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!

I wanted to suggest this feature to the Boostnote IO developers and now I posted your example to the corresponding issue.

BoostIO/BoostNote-Legacy#1592

Great! I have updated the docs to include the example.