NEWCKEditor AI on your premises: Hook your LLM and register MCP tools. Webinar coming soon!
Sign up (with export icon)

AIReviewModeConfig

Api-interface iconinterface

Properties

  • Chevron-right icon

    availableCommands : Array<string> | undefined

    List of IDs of review commands that will be available in the AI Review feature UI. If not set, all available predefined commands will be used. The order of IDs defines the order of commands in the UI.

    The list of all predefined commands, used by default:

    • custom
    • correctness
    • clarity
    • readability
    • length
    • tone

    The commands can be used selectively and rearranged with this configuration option. For example:

    ClassicEditor
    	.create( editorElement, {
    		ai: {
    			review: {
    				availableCommands: [
    					'length', 'tone', 'clarity', 'readability'
    				]
    			}
    		}
    	} )
    	.then( ... )
    	.catch( ... );
    
    Copy code
  • Chevron-right icon

    List of extra review commands that can be added to the AI Review feature.

    Keep in mind that each command should have a unique ID that does not collide with predefined commands. The custom command ID is reserved and cannot be used as an ID for extra command.

    To add a command and expose it in the UI, first a command definition needs to be provided:

    ClassicEditor
    	.create( editorElement, {
    		ai: {
    			review: {
    				extraCommands: [
    					{
    						id: 'improve-captions',
    						label: 'Improve Captions',
    						description: 'Improve image captions in the document.',
    						prompt: 'Suggest improvements for the image captions in the document.',
    					},
    					{
    						id: 'expand-abbreviations',
    						label: 'Expand Abbreviations',
    						description: 'Expand abbreviations in the document.',
    						prompt: 'Suggest expansions for abbreviations in the document.',
    						model: 'gpt-5-2' // Optional, if not set, default model will be used.
    					}
    				]
    			}
    		}
    	} )
    	.then( ... )
    	.catch( ... );
    
    Copy code

    Then if availableCommands is not set, the extra commands will be added to the end of the list of available commands and visible in the UI by default. Otherwise, the extra commands need to be explicitly added to the list of available commands to be exposed in the UI:

    ClassicEditor
    	.create( editorElement, {
    		ai: {
    			review: {
    				extraCommands: [ ... ],
    				availableCommands: [
    					'custom', 'correctness', 'clarity', 'readability', 'length', 'tone', 'improve-captions', 'expand-abbreviations'
    				]
    			}
    		}
    	} )
    	.then( ... )
    	.catch( ... );
    
    Copy code