# Comments-only mode

In the comments-only mode, you can create, edit, and remove comments but you are unable to change the document content.

<a id="enabling-comments-only-mode">

## Enabling comments-only mode

The recommended way to enable the comments-only mode is by setting proper [user permissions](../users.md#user-permissions).

If you need to enable or disable this mode based on some other logic (different from the user permissions), you can set it using the [`CommentsOnly` API](../../../api/module_comments_commentsonly-CommentsOnly.md).

You can use the following editor configuration:

```js
ClassicEditor
	.create( {
		commentsOnly: true,
		// More editor's configuration.
		// ...
	} )
	.then( /* ... */ )
	.catch( /* ... */ );
```

You can also change the mode by setting the [`CommentsOnly#isEnabled`](../../../api/module_comments_commentsonly-CommentsOnly.md#member-isEnabled) property:

```js
editor.plugins.get( 'CommentsOnly' ).isEnabled = true;
```

> **Note**
>
> Complementary to this guide, we provide a [ready-to-use **sample** available for download](https://github.com/ckeditor/ckeditor5-collaboration-samples/tree/master/collaboration-editor-classic). You may use the sample as an example or as a starting point for your own integration.

<a id="demo">

## Demo

Check out the comments-only mode in action in the editor below. Please note how only the content-editing features become disabled in this mode. Other features that do not affect the content like export to Word or search (but not replace!) are still available.

<!-- 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. -->

<a id="security">

## Security

Please remember that your application should be secured both on the frontend and backend. Even though the users will not be able to introduce their changes through the editor, you should still take care of preventing such action in your backend code.

---

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