insert_img_link: Insert an image link to an image on your clipboard

View source: R/fns.R

insert_img_linkR Documentation

Description

This function let's you "paste" an image from your clipboard into your Quarto document. It's available as an RStudio addin so you can bind it to a keyboard shortcut. I use ctrl+shift+H.

Usage

insert_img_link(img_dir = "images/")

Arguments

img_dir

directory where the image will be pasted (relative to the working directory of the current document in the source panel).

Details

This function requires xclip to be installed on the user's system (non-Linux users, you're on your own). It copies the image from the clipboard to the specified image directory into a time-stamped file, then inserts the link to the image in the current source pane document at the cursor. It also includes an empty alternate text tag to encourage authors to make their work more accessible.


andrewGhazi/geryon documentation built on April 14, 2025, 3:51 p.m.