# Plugin: js-draw integration

**URL:** <https://discourse.joplinapp.org/t/plugin-js-draw-integration/27114>\
**Category:** Plugins\
**Tags:** gsoc-2022, handwriting\
**Created:** [29 August 2022 22:05 UTC](https://discourse.joplinapp.org/t/plugin-js-draw-integration/27114 "2022-08-29T22:05:49Z")\
**Posts on this page:** 1\
**Showing post:** 31

<div class="post-metadata">

**Author:** ![personalizedrefriger](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/personalizedrefriger/32/13210_2.png) [@personalizedrefriger](https://discourse.joplinapp.org/u/personalizedrefriger)\
**Post date:** [30 November 2022 22:48 UTC](https://discourse.joplinapp.org/t/plugin-js-draw-integration/27114/31 "2022-11-30T22:48:14Z")

</div>

> [@saarantras](#):
>
> Are there plans to integrate this in to the rich text editor (currently images won't save when opened from there)?

I've tried! Calling [`insertText`](https://github.com/personalizedrefrigerator/joplin-plugin-freehand-drawing/blob/f7b1f6343dc897ab77bc79c914a694c8d76a53f1/src/index.ts#L83) when the rich text editor is open doesn't seem to work with SVG images (it's inserting part of the image as text. I'll have to look into this further...). Programmatically switching to the markdown editor, then calling insertText, and switching back to the rich text editor is something that might work...

Additionally, I haven't found a way to send messages from the rich text editor's WebView to the main plugin script ([webviewApi.postMessage](https://github.com/personalizedrefrigerator/joplin-plugin-freehand-drawing/blob/f7b1f6343dc897ab77bc79c914a694c8d76a53f1/src/contentScripts/markdownIt.ts#L93) doesn't seem to exist in the rich text editor). As such, I don't know how to get an "edit image" button in the rich text editor to communicate with the main plugin.

> I'm so glad this is getting added. It's really a key feature, & the previous work-around (embed an image & edit with an external program) was always cumbersome.

Be aware that [Plugin: draw.io](https://discourse.joplinapp.org/t/plugin-draw-io/24037) and [Plugin: support Excalidraw in joplin](https://discourse.joplinapp.org/t/plugin-support-excalidraw-in-joplin/27686) also exist.

---

_[View the full topic](https://discourse.joplinapp.org/t/plugin-js-draw-integration/27114)._
