# Select all

The select all feature lets you select the entire content using the `Ctrl`/`Cmd`+`A` keystroke or a toolbar button. This way you can clear or copy all the content in one move.

<a id="demo">

## Demo

Press `Ctrl`/`Cmd`+`A` or use the toolbar button to select the entire content of the editor.

> **Note**
>
> When the selection is inside the [image caption](images/images-captions.md), it will only expand to the boundaries of the caption. Use the keystroke or the toolbar button again to include more content until the entire content of the editor is selected. The same rule applies when the selection is inside a table cell or any self–contained (nested) editable part of the content.

<!-- AI-AGENT-NOTE: An interactive demo is embedded here but is not represented in this Markdown file. If you need to see it in action, open this page in a browser (e.g. via a browser-automation MCP like Chrome DevTools or Playwright), or let the user know a live demo is available on this page. -->

This demo presents a limited set of features. Visit the [feature-rich editor example](../examples/builds-custom/full-featured-editor.md) to see more in action.

<a id="installation">

## Installation

After [installing the editor](../getting-started/installation/cloud/quick-start.md), add the feature to your plugin list and toolbar configuration:

**NPM**

```js
import { ClassicEditor, SelectAll } from 'ckeditor5';

ClassicEditor
	.create( {
		licenseKey: '<YOUR_LICENSE_KEY>', // Or 'GPL'.
		plugins: [ SelectAll, /* ... */ ],
		toolbar: [ 'selectAll', /* ... */ ],
	} )
	.then( /* ... */ )
	.catch( /* ... */ );
```

**CDN**

```js
const { ClassicEditor, SelectAll } = CKEDITOR;

ClassicEditor
	.create( {
		licenseKey: '<YOUR_LICENSE_KEY>',
		plugins: [ SelectAll, /* ... */ ],
		toolbar: [ 'selectAll', /* ... */ ],
	} )
	.then( /* ... */ )
	.catch( /* ... */ );
```

> **Note**
>
> Read more about [installing plugins](../getting-started/setup/configuration.md) and [toolbar configuration](../getting-started/setup/toolbar.md).

<a id="related-features">

## Related features

* [Keyboard shortcuts](accessibility.md#keyboard-shortcuts) – Check other popular keyboard shortcuts supported by CKEditor 5.

<a id="common-api">

## Common API

The [`SelectAll`](../api/module_select-all_selectall-SelectAll.md) plugin registers the `'selectAll'` UI button component and the `'selectAll'` command implemented by [`SelectAllCommand`](../api/module_select-all_selectallcommand-SelectAllCommand.md).

You can execute the command using the [`editor.execute()`](../api/module_core_editor_editor-Editor.md#function-execute) method:

```js
// Select the entire content of the editor.
editor.execute( 'selectAll' );
```

> **Note**
>
> We recommend using the official [CKEditor 5 inspector](../framework/development-tools/inspector.md) for development and debugging. It will give you tons of useful information about the state of the editor such as internal data structures, selection, commands, and many more.

<a id="contribute">

## Contribute

The source code of the feature is available on GitHub at <https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-select-all>.

---

Full index of the CKEditor 5 documentation: [llms.txt](../../llms.txt)
