> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: siteWindow.copyToClipboard(text: string) # Method Link: https://dev.wix.com/docs/sdk/frontend-modules/window/copy-to-clipboard.md # Method Description: Copies text to a site visitor's clipboard. `copyToClipboard()` copies the specified text to a site visitor's clipboard. If a site visitor's browser doesn't support copying text to the clipboard programmatically, a modal popup that allows copying will be displayed. For example, when calling `copyToClipboard()` from a Firefox or Edge browser, a site visitor will see something similar to the popup shown below. ![Copy To Clipboard Popup](https://wixmp-833713b177cebf373f611808.wixmp.com/images/velo-images/media_copytoclipboardmodal.png "Copy To Clipboard Popup") The Promise returned by `copyToClipboard()` resolves when the specified text is copied to clipboard or the modal popup is closed. The Promise is rejected if a `null` value is passed as the `toCopy` parameter or if a site visitor's browser blocks the modal popup from opening. # Method Permissions: # Method Permissions Scopes IDs: undefined # Method Code Examples: ## Copy text to clipboard ```javascript import { window } from '@wix/site-window'; // ... window.copyToClipboard("Text to copy!") .then( () => { // handle case where text was copied } ) .catch( (err) => { // handle case where an error occurred } ); ```