# Plugin: draw.io

**URL:** <https://discourse.joplinapp.org/t/plugin-draw-io/24037>\
**Category:** Plugins\
**Created:** [26 February 2022 19:03 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037 "2022-02-26T19:03:15Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![marc0l92](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/marc0l92/32/7374_2.png) [@marc0l92](https://discourse.joplinapp.org/u/marc0l92)\
**Post date:** [24 March 2022 21:31 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/21 "2022-03-24T21:31:44Z")

</div>

Joplin stores the resources like attachments and images in the resources folder in the profile  
 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/7/7318e412efc1afaee6f20fd0081ffedc3d3f4f7f.png)  
When you create a new image with the tools menu:  
 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/d/d15c89c025af2287f5367e0ad4f569e0e04a3d85.png)  
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.

---

<div class="post-metadata">

**Author:** ![marc0l92](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/marc0l92/32/7374_2.png) [@marc0l92](https://discourse.joplinapp.org/u/marc0l92)\
**Post date:** [24 March 2022 22:09 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/22 "2022-03-24T22:09:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Imperial\_Squid](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/imperial_squid/32/15471_2.png) [@Imperial\_Squid](https://discourse.joplinapp.org/u/Imperial_Squid)\
**Post date:** [24 March 2022 22:48 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/23 "2022-03-24T22:48:07Z")

</div>

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...

---

<div class="post-metadata">

**Author:** ![bepolymathe](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/bepolymathe/32/8492_2.png) [@bepolymathe](https://discourse.joplinapp.org/u/bepolymathe)\
**Post date:** [25 March 2022 06:58 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/24 "2022-03-25T06:58:08Z")

</div>

Thanks for reply +1

---

<div class="post-metadata">

**Author:** ![marc0l92](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/marc0l92/32/7374_2.png) [@marc0l92](https://discourse.joplinapp.org/u/marc0l92)\
**Post date:** [27 March 2022 16:05 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/25 "2022-03-27T16:05:20Z")

</div>

I just released v2.0.0 of this pluing.

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

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

```

to

```auto
![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

---

<div class="post-metadata">

**Author:** ![bepolymathe](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/bepolymathe/32/8492_2.png) [@bepolymathe](https://discourse.joplinapp.org/u/bepolymathe)\
**Post date:** [27 March 2022 18:53 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/26 "2022-03-27T18:53:57Z")

</div>

Hi @marc0l92

Thanks for that !

> [@marc0l92](#):
>
> Can you help me test this new version?

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

---

<div class="post-metadata">

**Author:** ![Thulium-Drake](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/thulium-drake/32/13232_2.png) [@Thulium-Drake](https://discourse.joplinapp.org/u/Thulium-Drake)\
**Post date:** [27 March 2022 18:56 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/27 "2022-03-27T18:56:20Z")

</div>

The PNG version also works fine! 😄

---

<div class="post-metadata">

**Author:** ![dpoulton](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/dpoulton/32/29723_2.png) [@dpoulton](https://discourse.joplinapp.org/u/dpoulton)\
**Post date:** [27 March 2022 19:14 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/28 "2022-03-27T19:14:08Z")

</div>

And the plugin does sync changes between clients.

---

<div class="post-metadata">

**Author:** ![marc0l92](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/marc0l92/32/7374_2.png) [@marc0l92](https://discourse.joplinapp.org/u/marc0l92)\
**Post date:** [27 March 2022 22:58 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/30 "2022-03-27T22:58:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [28 March 2022 00:02 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/31 "2022-03-28T00:02:36Z")

</div>

> [@marc0l92](#):
>
> In addition I'm changing the resource id every time the diagram is modified in order to hopefully fix the sync issue.

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

---

<div class="post-metadata">

**Author:** ![marc0l92](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/marc0l92/32/7374_2.png) [@marc0l92](https://discourse.joplinapp.org/u/marc0l92)\
**Post date:** [28 March 2022 11:18 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/32 "2022-03-28T11:18:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [28 March 2022 11:23 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/33 "2022-03-28T11:23:39Z")

</div>

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

So do you use the [openAndWatch](https://discourse.joplinapp.org/t/hope-to-add-api-to-return-to-joplin-basic-info-includes-installation-directory/11981/8) API? Normally this should update the updated\_time property.

---

<div class="post-metadata">

**Author:** ![marc0l92](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/marc0l92/32/7374_2.png) [@marc0l92](https://discourse.joplinapp.org/u/marc0l92)\
**Post date:** [28 March 2022 11:42 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/34 "2022-03-28T11:42:35Z")

</div>

Thanks for the suggestion. I will try it.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [28 March 2022 15:37 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/35 "2022-03-28T15:37:19Z")

</div>

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

> <https://github.com/laurent22/joplin/commit/37d51c3b587160efb8c492133d4d0b8566a339e6>

---

<div class="post-metadata">

**Author:** ![gal064](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gal064/32/12509_2.png) [@gal064](https://discourse.joplinapp.org/u/gal064)\
**Post date:** [7 April 2022 22:48 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/36 "2022-04-07T22:48:30Z")

</div>

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

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

[https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/4/43afefa6bd3c3a6e8435cd274ce7a8dbfefc63e4.mov](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/4/43afefa6bd3c3a6e8435cd274ce7a8dbfefc63e4.mov)

Am I missing something?

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

---

<div class="post-metadata">

**Author:** ![novelx](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/novelx/32/6765_2.png) [@novelx](https://discourse.joplinapp.org/u/novelx)\
**Post date:** [8 April 2022 03:32 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/37 "2022-04-08T03:32:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bepolymathe](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/bepolymathe/32/8492_2.png) [@bepolymathe](https://discourse.joplinapp.org/u/bepolymathe)\
**Post date:** [8 April 2022 13:35 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/38 "2022-04-08T13:35:19Z")

</div>

Can you test with split view ?  
And maybe toogle this option ?  
 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/1/16ac8e5d164bf337d1dc7747f4d6fda21a14c4d7.png)

---

<div class="post-metadata">

**Author:** ![gal064](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gal064/32/12509_2.png) [@gal064](https://discourse.joplinapp.org/u/gal064)\
**Post date:** [8 April 2022 18:18 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/39 "2022-04-08T18:18:34Z")

</div>

Split view works, thanks!

---

<div class="post-metadata">

**Author:** ![gal064](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/gal064/32/12509_2.png) [@gal064](https://discourse.joplinapp.org/u/gal064)\
**Post date:** [8 April 2022 18:51 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/40 "2022-04-08T18:51:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![marc0l92](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/marc0l92/32/7374_2.png) [@marc0l92](https://discourse.joplinapp.org/u/marc0l92)\
**Post date:** [10 April 2022 10:07 UTC](https://discourse.joplinapp.org/t/plugin-draw-io/24037/41 "2022-04-10T10:07:38Z")

</div>

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.

[Previous page](https://discourse.joplinapp.org/t/plugin-draw-io/24037.md?page=1)

[Next page](https://discourse.joplinapp.org/t/plugin-draw-io/24037.md?page=3)
