Unlike toCanvasBtn only screenshot a defined element, this function can take screenshot of any element you specify in the text box and sent to canvas by using Jquery selector format.
toCanvasTextBtn( canvasID, label = "", text_value = "", placeholder = "type a selector", tooltip = "Screenshot any element to drawer canvas", placement = "bottom", btn_label = "To Canvas", color_class = "primary", style = "" )
string, the ID of canvas.
string, label of the whole group, on the top
string, nitial value of the text input
string, placeholder text of the text input
a tooltip of the group
where should the tooltip go?
text on the button
bootstrap button color class suffix, usually one of 'default', 'primary', 'info', 'success', 'warning', 'danger'
additional CSS style of the group, like "width: 50%"
a shiny input group
This component will not work unless a drawer canvas has been loaded on current document.
The selector uses Jquery selector.
If you are not familiar with it, just remember
the mostly commonly used is the element ID, which is the
in most Shiny components. Jquery selector is almost the same for ID, but requires
you to add "#" in front, "#element-ID".
If you have no idea about shiny or HTML selector, right click on the element, and click inspect, you should see the document HTML code in the inspector and the element you want should be highlighted. Find the attribute of "id", that's what you need. Again, append "#" in front of that value. Some elements do not have an "id", in this case, you need some advanced selectors. Learn about them by Google "CSS selector".
# see the example of "canvas", `?canvas`