gmunguia / markdown-it-plantuml Goto Github PK
View Code? Open in Web Editor NEW:herb: :book: plantuml diagrams in your markdown
License: MIT License
:herb: :book: plantuml diagrams in your markdown
License: MIT License
Do you have any plans to support Ditaa diagram?
http://en.plantuml.com/ditaa
The PlanUML online server already supports '@startditaa' and that diagram.
Example
This feature request is simple, to make more use out of this plugin we need to have access to the uml name inside the overridable methods for example the generator - currently this is not possible because the uml code passed is also without @startuml and @enduml. The name is defined as follows according to the PlantUML spec:
@startuml {NAME}
A -> B
@enduml
It would be amazing to have this name available so it can be used for example to save the image with a proper name
I created a custom generator which returns a custom url for loading the image (this url goes to a local path where plantuml diagrams are generated using node-plantuml) but even though I'm returning a new url when checking the generated source files when building (I'm using VuePress) it still shows the url to the plantuml server... why?
My console.logs in my custom generate source function are being executed...
Hi
I am using marked in my Angular Project, but I want to extend it to have PlantUML support. How can I use markdown-it-plantuml in Angular Project?
What I want to do is like following:
const MarkdownIt = require('markdown-it')
const md = new MarkdownIt()
md.use(require('markdown-it-plantuml'), {
openMarker: '```puml\n@startuml',
closeMarker: '@enduml\n```'
})
md.render(`\`\`\`puml
@startuml
Bob -> Alice : hello
@enduml
\`\`\``)
Because Previewing markdown on vscode needs the plantuml description to be enclosed with ```puml and ```.
When running the above sample, markdown-it-plantuml can find openMarker and closeMarker, but fails in moving the cursor after closing.
The simple solution is to rewrite index.js as follows, which will work as expected for me, but I'm not sure if it's the proper way.
135c135
< state.line = nextLine + (autoClosed ? 1 : 0);
---
> state.line = nextLine + (autoClosed ? 1 + closeMarker.match(/\n/g).length : 0);
Hi gmunguia,
it would be great, if your plugin would support also addtional diagram types like JSON Data (@startjson) and YAML Data (@startyaml) or Word Breakdown (@startwbs).
Sadly they have an addional syntax and i would have to copy your branch to support it.
The best place would be your plugin supporting the addtional syntaxes as well, if this would be easily possible for you.
Thanks for creating this heavily used plugin.
Best Regards
Holger
https://github.com/gmunguia/markdown-it-plantuml/blob/master/index.js#L10
This url can be changed to https and everything should still work normally.
This feature is needed so that I can use this plugin on my site and my site will remain secure.
Is vuepress2 supported here?
Wenn using the preview panel you need following tags to see the plantuml
````plantuml
[someNiceUML]
for the PDF export you need
@startuml
[someNiceUML]
@enduml
is there a way to print/see the UML in both not in either the preview or the export
Code resource is too long result in plantuml encode the url is too long.
Is there any solutions to solve it?
The example shows how to set options from javascript, but this is an awesome extension for VS Code using Markdown PDF extension. It would be great to be able to set a setting for this extension so it could direct to a private PlantUML server. I have to export to HTML, replace all URLs, and then print to PDF at the moment as a work around. In addition, the ability to strip the "/plantuml" from the url would be great. This would allow easy use with plantuml docker images as shown in the following examples:
docker: docker run -d -p 8080:8080 plantuml/plantuml-server:tomcat
currently generated: "http://www.plantuml.com/plantuml/svg/---sensitive---"
desired generated: "http://localhost:8080/svg/---sensitive---"
With create-react-app
default build
script, it tries to uglify the dependencies got the following error:
$ react-scripts build
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/markdown-it-plantuml/lib/deflate.js:6
Read more here: http://bit.ly/2tRViJ9
vscode-plantuml
gives a way to preview plantuml in markdown in vscode. See here
It will be a nice thing to support this feature because there is no need to delete ```plantuml ... ```
when deploy a site.
Hello,
I added vscode links in plantuml code like this:
[[vscode://file/C:/... (full link name)... text]]
While the generated HTML worked properly, the preview link is not correct. It seems to be adding an extra current path to the front of the absolute URI file path.
Thank you.
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.
Thanks so much for creating this markdown-it plugin!
Would it be feasible to add support for inline SVG? This would allow authors to style the SVG using CSS to match the branding of their site.
Please provide a markdown-it-plantuml.js
file that can be directly loaded into a page.
As an example you could look at how markdown-it-footnote does it.
They provide a script file that adds itself as a module globally, so that it can be called with window.markdownitFootnote
. This would be really great and enable the use of PlantUML in BookStack.
I am wondering if there is any way to support reusable elements in PlantUML diagrams as described at https://mrhaki.blogspot.com/2016/12/plantuml-pleasantness-include-partial.html?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.