Call this function as an addin from RStudio to insert a new flashcard at the cursor position. Protipp: Bind this function to a keyboard shortcut via Tools > Modify Keyboard Shortcuts. (Search for "addin" or "r2anki flashcard" to find the right functioncall.)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.