CopyToClipboard widget allows you to wrap your widgets (Editor, Text, TextArea, or Input) and str text with a copy button. This enables you to easily obtain the value of the wrapped content and copy it to your clipboard.
Function signature
CopyToClipboard( content="", widget_id=None)
Parameters
Parameters
Type
Description
content
Union[Editor, Text, TextArea, Input, str]
CopyToClipboard content
widget_id
str
Id of the widget
content
Determine input CopyToClipboard content.
type:Union[Editor, Text, TextArea, Input, str]
default value:""
copy_to_clipboard =CopyToClipboard(content="Some text to copy")
widget_id
ID of the widget.
type:str
default value:None
Methods and attributes
Attributes and Methods
Description
get_content()
Return wrapped content (i.e. widget or str)
Mini App Example
You can find this example in our Github repository: