Plugin: draw.io

Joplin stores the resources like attachments and images in the resources folder in the profile
image
When you create a new image with the tools menu:
image
the plugin stores the image in the resources folder and then places the tag in your note so it can be displayed in the markdown preview.

You don't have to create any fixed image or export the diagram.

1 Like

This plugin is still in development so I may have fix this issue without publishing a new release.
I now publish a new release with the last changes.

Can you test again with the version 1.3.0?

1 Like

Still no effect... I'm not terribly fussed about seeingit fixed right now honestly so please do focus on other things if you want to! I'll open up the dev tools and have a dig around to see if I can find what's going on and get back to you at some point.

Just wondering, do you know if Joplin does something like profiles? I'd like to mess around installing and uninstalling plugins as part of my investigating but don't want to mess up my current setup...

Thanks for reply +1

I just released v2.0.0 of this pluing.

In this version I'm changing the tag used in the markdown from:

<drawio id="](:/6a0a0fcf2b0246bca3a5b0bccbca1943)"/>

to

![drawio](:/6a0a0fcf2b0246bca3a5b0bccbca1943)

This will allow the plugin to:

  • work on mobile
  • be compatible with richtext editor

In addition I'm changing the resource id every time the diagram is modified in order to hopefully fix the sync issue.

Can you help me test this new version?

Thanks @Thulium-Drake for the feedbacks on github

7 Likes

Hi @marc0l92

Thanks for that !

Yes of course. What do you need ? Something special ?
I just create a sketch (SVG) and it seems to works fine :+1:

The PNG version also works fine! :smile:

1 Like

And the plugin does sync changes between clients.

This is my forth joplin plugin, and for each of them I was suprised to see how other users are using them in a really different way.

I tested:

  • wysiwyg compatibility
  • sync
  • automatic orphan resource delete
  • export to pdf
  • print note
  • create diagram
  • modify diagram

I never tested things like joplin notes encryption or compatibility with other plugins.
But I guess I will receive github issue for them in the future if there is something broken.

2 Likes

I'm not sure how the plugin works but is there an actual resource file associated with the drawio object? If so you'd need to make sure the updated_time value is updated to ensure it will sync.

If it's something different like some kind of virtual id, then probably it makes sense to do as you've done

How I can update the update_time value of a resource?

There is no PUT api for the resources and the feature to mark the resouce has opened by an external editor is not updating this value.

Right, it's true that there's no PUT call for resources, and we should probably add this.

So do you use the openAndWatch API? Normally this should update the updated_time property.

Thanks for the suggestion. I will try it.

If that can help I've now added support for updating a resource from the AP. It will be in the next desktop version:

3 Likes

@marc0l92
Thanks for building this. It's great!!

One question - I can't seem to see the edit a diagram after created:

Am I missing something?

I'm on Mac - Joplin version 2.7.14 - Plugin 2.0.0

The behavior of the plugin is somewhat different from the draw.io app, e.g. the former doesn't support "undo" (by cmd+z), and some other minor differences. Will this be fixed?

Can you test with split view ?
And maybe toogle this option ?
image

Split view works, thanks!

+1 undo doesn't work for me using the keyboard (e.g. cmd+z) or the undo button

1 Like

At the moment I'm quite busy with other projects. If someone can do a pull request to fix this issue I will take a look at it.