insert_img_link | R Documentation |
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.
insert_img_link(img_dir = "images/")
img_dir |
directory where the image will be pasted (relative to the working directory of the current document in the source panel). |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.