Paste image from clipboard.

29 views
Skip to first unread message

Kaspars Vandans

unread,
Apr 6, 2023, 11:58:18 AM4/6/23
to leo-editor

Hey.
I'm looking to find out if Leo would be suited to my note-taking workflow.

Is it possible to paste an image from clipboard? I tried it, doesn't seem to work. I get the impression images can be displayed in general, but I spend around 3h a day pasting images into notes, so this is crucial to me.

I get the impression this is impossible. Am I correct?

Best regards.

Thomas Passin

unread,
Apr 6, 2023, 12:56:58 PM4/6/23
to leo-editor
No, Leo nodes cannot display images per se.  What you can do is to use markdown or ReStructuredText and use their syntax to show images.  The image file would need to be in a location in the files system like any other image file.  You can view the rendered node with its images, math symbols, etc., using the viewrendered3 plugin.

The extra typing to do this is very minimal if you don't want to use other features of these structured languages.

Another thing you could do is to insert the image file's path as a file: URL, like this example:

file://C:/Tom/health/covid/images/covid_frac_rate_with_significant_dates.png

You can also use relative paths.   When you CNTL-Click on the URL it will open in the image viewer selected by your OS.

On this Leo group we have recently started a discussion on how to embed images in Leo nodes directly.  In principle it can be done but there are some key details that need to be figured out first.

I can imagine writing a Leo script that would automate the mechanics of inserting an image directive into an ReST or MD page.   I don't think it would be hard, but as of now a script like that does not exist.

If you would like help to try out any of the suggestions above, please feel free to ask here.  Personally, I would use ReST or MD, and view the images with the VR3 plugin.  That's pretty much what I do most of the time.

Edward K. Ream

unread,
Apr 6, 2023, 1:06:57 PM4/6/23
to leo-editor
On Thursday, April 6, 2023 at 10:58:18 AM UTC-5 kaspars...@gmail.com wrote:

Is it possible to paste an image from clipboard?

Just about anything is possible with Leo because Leo is a programming environment.

Issue #3256 suggests allowing images in body text. Allowing pastes would be part of that issue.

Edward
Reply all
Reply to author
Forward
0 new messages