Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

joplin-plugin-freehand-drawing

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

joplin-plugin-freehand-drawing - npm Package Compare versions

Comparing version 2.3.1 to 2.4.0

11

CHANGELOG.md

@@ -0,1 +1,12 @@

# 2.4.0
- Bug fixes
- Fixes pressing <kbd>Ctrl</kbd>+<kbd>R</kbd> (resize to selection) also brings a selection to the top.
- Features
- Pressing <kbd>End</kbd> when there is a selection now sends the selection to the back.
- Pressing <kbd>Alt</kbd>+<kbd>q</kbd> is now equivalent to pressing "Exit".
- Initial support for customizing keyboard shortcuts within the editor.
- Keyboard shortcuts can be added to Joplin's `settings.json`.
- This is currently difficult to do, as there is no UI for this.
# 2.3.1

@@ -2,0 +13,0 @@

6

package.json
{
"name": "joplin-plugin-freehand-drawing",
"version": "2.3.1",
"version": "2.4.0",
"scripts": {

@@ -47,5 +47,5 @@ "dist": "webpack --env joplin-plugin-config=buildMain && webpack --env joplin-plugin-config=buildExtraScripts && webpack --env joplin-plugin-config=createArchive",

"dependencies": {
"@js-draw/material-icons": "^1.10.0",
"js-draw": "^1.10.0"
"@js-draw/material-icons": "^1.11.0",
"js-draw": "^1.11.0"
}
}

@@ -5,3 +5,3 @@ {

"app_min_version": "2.10",
"version": "2.3.1",
"version": "2.4.0",
"name": "Freehand Drawing",

@@ -35,4 +35,4 @@ "description": "Create and edit drawings with js-draw.",

],
"_publish_hash": "sha256:49ed542989310a7d09bef100600d832b7514b4062ea219abaa21d249f3b7dd10",
"_publish_commit": "main:1ae9dbd140ed804a556fabba8801490a73a41c3e"
"_publish_hash": "sha256:bc730f54fce0b65b5921d2ba60dd6deb99dbad02ca757cea229c92882e670bb1",
"_publish_commit": "main:562b9f3b31dca6b2a9012f29db14fd8717e341b6"
}

@@ -20,4 +20,103 @@ # `joplin-plugin-freehand-drawing`

# Notes
# FAQ
- This plugin uses [js-draw](https://github.com/personalizedrefrigerator/js-draw) to edit/create freehand drawings. Bugs related to `js-draw` can be reported using its [issue tracker](https://github.com/personalizedrefrigerator/js-draw/issues).
## How do I edit drawings from the rich text editor?
**Editing an existing drawing**: Double-click on the drawing.
**Adding a new drawing**: Click either the ![pen](https://github.com/personalizedrefrigerator/joplin-plugin-freehand-drawing/assets/46334387/f3a60f00-f1e3-4a8c-9ab7-b0e7c7fea336) toolbar button or "Insert Drawing" from the `Edit` menu.
> **Warning**
>
> To insert drawings in the rich text editor, this plugin works around [this Joplin bug](https://github.com/laurent22/joplin/issues/7547) by **briefly switching to the markdown editor** and back to the rich text editor. This clears the rich text editor's undo history. This should only **apply to new drawings.**
## I only use the markdown editor (no viewer). How do I edit drawings?
First, select the full resource URL for an image created with this plugin
![screenshot: Resource URL (includes :/) is selected](https://github.com/personalizedrefrigerator/joplin-plugin-freehand-drawing/assets/46334387/2c71ccc0-d055-45f7-9db7-e0f33f353b81)
Next, click the "Insert Image" button in the toolbar.
## How do I assign a keyboard shortcut to the "Insert Image" button?
1. Open Joplin's settings
2. Click on "Keyboard Shortcuts"
3. Search for "Insert Drawing"
4. Click "_Disabled_"
![screenshot: Arrow pointing to "disabled" in the second column of the keyboard shortcuts table](https://github.com/personalizedrefrigerator/joplin-plugin-freehand-drawing/assets/46334387/44be3c8a-ac9a-4427-a91d-bcb5a21d7281)
5. Entering a new key combination (e.g. <kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>D</kbd>).
## How do I disable drawing with touch?
Pen/mouse-only drawing can be enabled under the "Pan" tool's menu by **enabling "Touchscreen panning"**:
![screenshot: Arrow points to pan tool, another arrow points to the "Touchscreen panning" toggle button](https://github.com/personalizedrefrigerator/joplin-plugin-freehand-drawing/assets/46334387/682a40ab-0c0f-4dc8-ba49-463dcb06256a)
## Joplin closed while editing a drawing. How do I recover the unsaved changes?
`joplin-plugin-freehand-drawing` autosaves every two minutes. The last autosave can be recovered by
1. Switching to the markdown editor
2. pressing <kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>P</kbd> (<kbd>Cmd</kbd>-<kbd>Shift</kbd>-<kbd>P</kbd>),
3. typing `:restore autosave`, then
4. clicking "Restore from autosaved drawing"
![screenshot: Command palette shows :restore autosave as search query, second result "Restore from autosaved drawing" is highlighted.](https://github.com/personalizedrefrigerator/joplin-plugin-freehand-drawing/assets/46334387/dadaed12-95b5-4c3f-a5cc-f322ad41476d)
This should add a copy of the autosaved drawing to the current note.
## How do I customize the image editor's keyboard shortcuts?
The procedure to do this is currently very complicated, as there is no GUI for this. (Making this simpler is planned!).
<details><summary>Customizing keyboard shortcuts</summary>
First, open Joplin's profile directory ("Help" > "Open profile directory").
Next, open `settings.json` in a text editor.
Near the end, there should be a line similar to this:
```json
"plugin-io.github.personalizedrefrigerator.js-draw.keyboard-shortcuts": { }
```
Shortcuts can be added between the `{` and the `}`. For example,
```json
"plugin-io.github.personalizedrefrigerator.js-draw.keyboard-shortcuts": {
"jsdraw.toolbar.ExitActionWidget.exit": [
"ctrlOrMeta-w",
"alt-q"
],
"jsdraw.toolbar.SaveActionWidget.save": [
"ctrlOrMeta-s",
"ctrlOrMeta-shift-s"
],
"jsdraw.toolbar.PenTool.select-pen-1": [
"CtrlOrMeta-1",
"alt-1"
],
"jsdraw.toolbar.SelectionTool.resizeImageToSelection": [
"ctrlOrMeta-r",
"m"
]
}
```
adds additional shortcuts for exiting, selecting pen style 1, and resizing the visible region to the selection.
After changing the shortcuts, Joplin should be restarted.
> **Note**
>
> Additional keyboard shortcut IDs can be found [in js-draw's source code](https://github.com/personalizedrefrigerator/js-draw/blob/main/packages/js-draw/src/tools/keybindings.ts).
</details>
## How do I report a bug related to the image editor?
This plugin uses [js-draw](https://github.com/personalizedrefrigerator/js-draw) to edit/create freehand drawings. Bugs related to `js-draw` can be reported using its [issue tracker](https://github.com/personalizedrefrigerator/js-draw/issues).
If you're unsure whether a bug is related to `js-draw` or this plugin, consider first [reporting the bug on this plugin's GitHub repository](https://github.com/personalizedrefrigerator/joplin-plugin-freehand-drawing/issues/new/choose). If it's more relevant to `js-draw` than this plugin, it will be moved by a maintainer.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc