Socket
Socket
Sign inDemoInstall

joplin-plugin-freehand-drawing

Package Overview
Dependencies
2
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

joplin-plugin-freehand-drawing

[On GitHub](https://github.com/personalizedrefrigerator/joplin-plugin-freehand-drawing) | [On the Joplin Forum](https://discourse.joplinapp.org/t/plugin-js-draw-integration/27114) | [Online Demo](https://personalizedrefrigerator.github.io/js-draw/example/


Version published
Maintainers
1
Weekly downloads
65
increased by622.22%

Weekly downloads

Readme

Source

joplin-plugin-freehand-drawing

On GitHub | On the Joplin Forum | Online Demo | Installing

A Joplin plugin for creating and editing freehand drawings using js-draw.

Installing

Search for "freehand drawing" under the plugins tab in Joplin's settings: screenshot of the search bar and results in the plugins tab. Freehand Drawing // create and edit drawings with js-draw is the only visible result.

After installation, an "insert drawing" button should appear in the toolbar: A pen icon labeled "insert drawing" is shown in the markdown toolbar, just to the right of the "insert date" button.

Existing drawings can be edited by hovering over the drawing in the markdown preview pane, then clicking "edit". screenshot of a drawing in the preview pane and an edit button, beneath the cursor. The edit button is at the bottom-right of the drawing.

FAQ

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

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
  5. Entering a new key combination (e.g. Ctrl-Shift-D).

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

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 Ctrl-Shift-P (Cmd-Shift-P),
  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.

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

Customizing keyboard shortcuts

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:

    "plugin-io.github.personalizedrefrigerator.js-draw.keyboard-shortcuts": { }

Shortcuts can be added between the { and the }. For example,

	"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"
		]
	}

The above adds additional shortcuts for exiting, selecting pen style 1, and resizing the visible region to the selection.

Joplin must be restarted for the changes to be applied.

Note

Additional keyboard shortcut IDs can be found in js-draw's source code.

This plugin uses js-draw to edit/create freehand drawings. Bugs related to js-draw can be reported using its issue tracker.

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. If it's more relevant to js-draw than this plugin, it will be moved by a maintainer.

Keywords

FAQs

Last updated on 22 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc