toCanvasBtn | R Documentation |
A bootstrap button that allows users to take a screenshot of specified HTML element (usually an image) and send it to the drawer canvas for editing. In addition, you can download it as "png" or "jpg" by opening up the dropdown menu.
toCanvasBtn( dom, canvasID, isID = TRUE, id = "", label = "To Canvas", color_class = "primary" )
dom |
a HTML DOM selector, mostly common is to select the element by ID:
e.g. a plot with ID "plot1", to select, use Other complex selector is supported. First turn |
canvasID |
string, the ID of canvas. Unlike |
isID |
bool, |
id |
string, ID for this button, optional |
label |
label of this button, optional |
color_class |
bootstrap button color class suffix, usually one of 'default', 'primary', 'info', 'success', 'warning', 'danger' |
This component will not work unless a drawer canvas has been loaded on current document.
a button
# see example of "canvas", `?canvas`
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.