BX.clipboard.bindCopyClick
void BX.clipboard.bindCopyClick( DOMNode YourNode, Object params );
Fuction copies text to clipboard when clicking on a certain DOM element.
Function parameters
Parameter | Description |
---|---|
YourNode | Element, when clicking on which the copying is performed |
params | Array of parameters. Possible 'params' object keys:
|
Examples of use
BX.clipboard.bindCopyClick( BX('copy_button'), { text: BX('copy_text') } );
Copying of the BX('copy_text') container content (text) to clipboard will occur when clicking on the BX('copy_button') element (container can be a form input element as well).
© «Bitrix24», 2001-2024