Javascript necessary to render plantuml from content in a html-block of class "language-plantuml". Possible to use with Gitea.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
David Svantesson 703f5b0570 Uppdatera 'README.md' 6 months ago
README.md Uppdatera 'README.md' 6 months ago
deflate.js Javascripts from plantuml and first test 6 months ago
encode.js Javascripts from plantuml and first test 6 months ago
plantuml_codeblock_parse.js Make it a function 6 months ago

README.md

plantuml-code-highlight

Javascript necessary to render plantuml from content in a html-block of class "language-plantuml". Possible to use with Gitea.

Install

Copy the javascript files to your server. Then to convert all html blocks having the class language-plantuml add the following to the html page:

<script src="https://your-server.com/deflate.js"></script>
<script src="https://your-server.com/encode.js"></script>
<script src="https://your-server.com/plantuml_codeblock_parse.js"></script>
<script>
parsePlantumlCodeBlocks("http://www.plantuml.com/plantuml,"language-plantuml")
</script>

Specifically for Gitea: Copy the javascript files to your custom/public folder. Then place the following code in custom/templates/custom/footer.tmpl:

{{if .RequireHighlightJS}}
<script src="https://your-server.com/deflate.js"></script>
<script src="https://your-server.com/encode.js"></script>
<script src="https://your-server.com/plantuml_codeblock_parse.js"></script>
<script>
parsePlantumlCodeBlocks("http://www.your-plantuml-server.com/plantuml")
</script>
{{end}}

License