question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: Paste image from clipboard in editor

See original GitHub issue

While writing a blog post with Ghost i sometimes use the Windows/Ubuntu Snippet tool to copy images or make screenshots.

Current steps to add an image

  1. Open snippet tool
  2. Select area to copy
  3. Save image to folder
  4. Open editor and press Ctrl + Shift + I to add image tag
  5. Click on the image preview
  6. Open popup, navigate to folder and choose image
  7. Image added

With paste support from clipboard these steps are reduced to

  1. Open snippet tool
  2. Select area to copy
  3. Open editor and press Ctrl + V
  4. Image added

I’ve written a plugin which allows users to paste content from the clipboard in a textarea or editors like CodeMirror. This plugin can be used, or only use the code which is relevant for the textarea editor.

Right now most browsers lack the support for listening to paste events, only Chrome supports it natively, Firefox works with some ugly hacks. I’m also not sure how pasting images would work on mobile.

If this feature is accepted then i can implement it and base it on #4373.

As an extra adding drag-drop support is fairly simple with these changes, it only requires hooking into a few native drag events. Both the drag and paste event have a FileList available from which to read the files.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:3
  • Comments:18 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
hedefalkcommented, Jan 31, 2018

For reference, there’s the github functionality that’s closed source I guess, and there’s an Atom plugin, https://atom.io/packages/markdown-image-helper and a vscode one: https://marketplace.visualstudio.com/items?itemName=mushan.vscode-paste-image

I would want it to work like the github one, when typing this on OSX I just hit cmd-shit-4, mark an area and paste it with cmd-v:

image

turns to an ajax upload and inserted markdown image. It’s like zillion times better than file handling , drag and drops for productivity. It’s really sub-second compared to at least tens of seconds to grab a file.

PS. there’s a setting in osx to make screenshots go to clipboard instead of png’s on desktop.

1reaction
ErisDScommented, Jan 17, 2017

I think it makes sense to close this and #6897 in favour of #7429 (the epic issue for the new editor). We can reopen them once the new editor is shipped, if these features don’t make it into the first iteration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Directly Paste image from Clipboard to the Editor
Directly Paste image from Clipboard to the Editor ... 2) Right click on a page and click on Web capture and select an...
Read more >
Paste Images from Clipboard into WYSIWYG Article Editor
This feature lets you paste images from clipboard directly into the WYSIWYG editor or drag & drop local images from your computer.
Read more >
Paste image from clipboard directly in editor #7187 - GitHub
Describe the feature Paste image from clipboard directly in editor sometimes, we didn't need to save picture, but only insert it to website....
Read more >
paste image from clipboard - JCE Editor
Hi, I need a basic functionality to paste an image from the clipboard and the image should be uploaded automatically.
Read more >
Dendron Paste Image - Visual Studio Marketplace
Extension for Visual Studio Code - paste image from clipboard ... This is a fork of Paste Images to support Dendron specific features!...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found