Report an issue

guideComments-only mode

# Enabling comments-only mode

Comments-only mode is an editor mode where the user is allowed to create, edit and remove the comments but not to change the document content.

The recommended way to enable the comments-only mode is by setting proper 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.

You can use the following editor configuration:

ClassicEditor.create( document.querySelector( '#editor' ), {
    commentsOnly: true,
    // ...
} );

You can also change the mode by setting the CommentsOnly#isEnabled property:

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

Complementary to this guide, we provide a ready-to-use sample available for download. You may use the sample as an example or as a starting point for your own integration.

# Demo

Check out the comments-only mode in action in the editor below:

# Security

Please remember that your application should be secured both on front-end and back-end. 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 back-end code.