> For the complete documentation index, see [llms.txt](https://cranford-tech.gitbook.io/charles/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cranford-tech.gitbook.io/charles/key-features/get-text-selected-by-user.md).

# Get text selected by user

1. Place the `Charles: Selected text` element on the page
2. Access the elements state Selected Text

<div align="left"><figure><img src="https://1746625412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8XSg57nbIyYLBX9iJLb%2Fuploads%2FSgJChMrq1n26isUcdNTf%2Fimage.png?alt=media&amp;token=0f7c99d8-491f-4c4e-9103-3ea190ef3e01" alt=""><figcaption></figcaption></figure></div>
