toCanvasBtn {drawer} | R Documentation |
Screenshot HTML elements to canvas button
Description
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.
Usage
toCanvasBtn(
dom,
canvasID,
isID = TRUE,
id = "",
label = "To Canvas",
color_class = "primary"
)
Arguments
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' |
Details
This component will not work unless a drawer canvas has been loaded on current document.
Value
a button
Examples
# see example of "canvas", `?canvas`