Plugin: PlantUML

Sorry for my little knowledge of the subject, but I understand that this plugin replaces the one created by uphy, so we should uninstall the previous one and install this PlantUML v1.2.0, is that correct? I can see both in the plugin list, I know it is like a fork plugin but I assume is an improved and updated version of the first one. Right?

If you uninstall or disable the plugin PlantUml v0.0.1, you can then install PlantUml2 v1.2.0

You don't have to do any changes to your notes because they both use the same markdown syntax.

Please try PlantUml2 e give us your feedbacks so we can work on it to improve it.

If you think PlantUml2 in not working well you can go back to the previous version but be aware that it is not maintained anymore.

Thanks for the update @marc0l92. I guess we could mark the previous version as deprecated quite soon so that user can start moving to yours.

By the way the previous version could potentially crash the app as described here. It's an issue I've tried to mitigate on application side but it seems the exception thrown by the PlantUML lib escapes whatever boundary I set. Do you know if your plugin has this issue too?

I'm not using the same library that was used by the previous plugin version.
I'm not sure what is the example that should make Joplin crash by I tried the one in the first issue comment and the one in the attached file and they are both working on windows.

recordingGif

1 Like

That's brilliant, then it means it's most likely fixed then. Because when I've tried that JEX file earlier it was crashing the app right away.

By the way, I've added some info about making a plugin obsolete here:

https://github.com/joplin/plugins/blob/master/readme/obsoletes.md#about-obsolete-plugins

I've just realised it's something that can be done relatively easily via a pull request, so would you mind giving it a try and make the old PlantUML plugin obsolete?

1 Like

Here the pull request:

2 Likes

Hello! Thanks for a cool plugin! I'm using this often. Is there any way to integrate it with links to other notes? For example: to use name of notes in PlantUML mindmaps

Would you like to have a specific syntax specific to Joplin to reference other pages?

Or you are talking about the plantuml links feature:

In order to create something like:

3 Likes

Seems like it doesn't navigate to the target note. Also when Joplin tries to open a link to the target site it's doing that in the internal browser and after clicking - there's no way to go back to the notes list (only force app restart)

Try to click on the link in the rendered SVG picture:

@startmindmap
* Actors
** [[http://plantuml.com/sequence Alice]]
@endmindmap

I just released the version 1.6.0 of this plugin that renders the svg images in a different way in order to support links.

I updated the GitHub Readme with an example on how to create link to other notes and external links.

@xardbaiz give it a try and let me know if you are able to create the links you are asking for

3 Likes

Wow! Great job! Thanks!

  • External links working great. It opens them in the default system browser. Well done!
  • Internal links with your custom syntax joplin://<noteId> also work. But probably better to leave default joplin syntax for internal markdown links such just :/<noteId> ?

In joplin both syntax are supported:
image

The syntax with :/<noteId> is not actually a valid URI syntax so it does not work if you create an anchor tag:

joplin://<nodeId> is a valid URI where the protocol is joplin.

The syntax :/<noteId> works with markdown because joplin add some javascript:

image

4 Likes

Is the @startgantt supposed to work?
It appears to be not...

sorry.
It does work!

Hi @marc0l92
Is there any issues with the plugin?
I have some created diagram that are not rendering anymore. I checked the syntax, and it seems, the syntax is OK. In fact, these were rendered without any problem in the past.
Maybe there is any incompatibility with a new plugin installed or is related to this plugin itself. Let me know if there is any issue with the plugin, to avoid find out the problem in other place. Thanks.

Hi Eduardo, maybe this post will be of interest. I had a similar problem and use an old version of the plugin which still renders correctly.

I had a similar problem to @Eduardo's (and the previous post) with v1.10.0 on macOS.

I found the following error in the development tools log, that occurs when the plugin starts (go to the Help menu --> Toggle development tools and search for "plant").

joplin.plugins: Uncaught exception in plugin "com.github.marc0l92.joplin-plugin-plantUML": Error: ENOENT: no such file or directory, stat '/var/folders/z8/6_9tvj2d6931fmn5q64r1xjm0000gn/T/joplin-plantUml2-plugin/'

Once I created the missing folder and restarted Joplin, the rendering of diagrams was fixed.

1 Like

Thanks, @shikuz! That fixed it here too.

In my case (Linux) the temporary folder missing was /tmp/joplin-plantUml2-plugin/, and once created happily the diagrams are rendered once again.

Hi @johano and @shikuz
Thanks, I have already created the temporary folder in my Linux OS and diagrams are rendered again.

It will be possible to fix the plugin for creating this folder automatically in the future, if not exist, or at least adding this warning in some additional place, to be aware to future users at the time installing this plugin?

the same problem after update to ver 2.9.17,check the code and debug,find out the plugin onStart() event handler method phase。this phase invoke the clearDiskCache() method,the code linefs.rmdirSync(Config.DiagramsCacheFolder, { recursive: true }) will lead to this problem ,just comment it or try catch it,the problem is solved .

but i don't understand ,the same code ,previous joplin ver is ok,ver 2.9.17 not work