You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Copy pasting image directly from clipboard to markdown file #627
Is it possible to directly copy-paste image from clipboard to markdown file using MarkText? Is this already implemented?
Steps:
Copy image to clipboard (using Ctrl+C, Windows' Snipping Tool/Screenshot, or Mac's Cmd+Shift+4)
Go to a markdown file in MarkText
Ctrl+V
File is automatically uploaded or stored in an asset directory (relative to the markdown file or in a dedicated directory for MarkText)
Link is automatically pasted to markdown file: 
What problem does this feature solve? [optional]
I often add screenshot of math formula, illustration, etc. to my note and it's a pain to manually upload things every time I add them. This is the only thing that ties me to Evernote...
Additional context [optional]
I'm a mid-level javascript developer. I'd be happy to contribute for this feature if the maintainers are busy doing other things. If any maintainer can point me to the right files/resources, it'd be really helpful.
Thanks
Reacted by Valvin, Zhongwei, Felix Häusler, Ran Luo, Lastthing拉诗的猩, brzhang, Gurran, Nicholas Tay, Escape0707, Anongh and 2 more
This is a really useful feature but the problem is that our backend muya is pure Javascript, so we can use it in a normal web browsers, and we don't have access to the local filesystem nor the clipboard data. We would need a "portal"/blocking event to Electron to access the desktop clipboard or implement it as plugin. In fact, I would prefer a plugin because it would be much less work because then we can use Electron to get the data.
Activity
fxha commentedon Jan 22, 2019
This is a really useful feature but the problem is that our backend
muyais pure Javascript, so we can use it in a normal web browsers, and we don't have access to the local filesystem nor the clipboard data. We would need a "portal"/blocking event to Electron to access the desktop clipboard or implement it as plugin. In fact, I would prefer a plugin because it would be much less work because then we can use Electron to get the data.You can find the paste handler here:
marktext/src/muya/lib/contentState/pasteCtrl.js
Line 69 in c169a77
Let us see if we can add a temporary solution until we support plugins.
Jocs commentedon Jan 24, 2019
@dotm It's a useful feature, we'll take it into consideration when we refactor
muya.Rishabh-malhotraa commentedon Mar 7, 2020
this does not work of you want to add more than one image file!
ranjithmkumar commentedon Jun 23, 2020
Sorry. May I know what is the current state of this feature?
simondebbarma commentedon Jan 7, 2022
Just passing by, trying to figure out how to implement this on my own on a personal project.
ldraney commentedon Jan 26, 2023
This would be a very useful feature
syedamaann commentedon Jan 16, 2024
Hey, what's the currents state of this feature? If not, I'd like to contribute in this if directed to the right resources.