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
Store images locally when copied from the browser #2462
Is there a way to save an image copied from the browser locally to the hard drive?
The way I have Marktext setup at the moment is as follows:
But when I right-click on an image and choose copy, what's being copied is the URL to that image.
Even if I edit the image properties and click on EMBED image, the path still shows the original URL (in fact, the local folder containing my images only shows the images I added via say screengrab).
I'm having the same problem with version 0.17.1 and Firefox on OSX. IT does work if I first save the image to disk and then open it via Preview and copy&paste from there.
I did a bit of testing today. Turns out that an image copied from a browser (I tested both Firefox and Chrome) contains the corresponding html in the clipboard (<img alt=... src=...>) even when copied via right-click and Copy Image. This causes the code in pasteCtrl.js to go down the html route and saves only the html. When copying via a different program, the clipboard doesn't contain html and the normal image handler gets triggered.
Imho, even when copying html, MarkText should adhere to the settings and save images locally. This probably means parsing the html and downloading all referenced images.
Activity
JonasPf commentedon Apr 15, 2022
I'm having the same problem with version 0.17.1 and Firefox on OSX. IT does work if I first save the image to disk and then open it via Preview and copy&paste from there.
Is this intended behaviour or a bug?
JonasPf commentedon Apr 17, 2022
I did a bit of testing today. Turns out that an image copied from a browser (I tested both Firefox and Chrome) contains the corresponding html in the clipboard (
<img alt=... src=...>) even when copied via right-click andCopy Image. This causes the code inpasteCtrl.jsto go down the html route and saves only the html. When copying via a different program, the clipboard doesn't contain html and the normal image handler gets triggered.Imho, even when copying html, MarkText should adhere to the settings and save images locally. This probably means parsing the html and downloading all referenced images.
Added functionality to paste html with images and