AIReviewModeConfig
Properties
availableCommands : Array<string> | undefinedmodule:ai/aireviewmode/aireviewmode~AIReviewModeConfig#availableCommandsList 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:
customcorrectnessclarityreadabilitylengthtone
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 codeextraCommands : Array<AIReviewCustomCommand> | undefinedmodule:ai/aireviewmode/aireviewmode~AIReviewModeConfig#extraCommandsList 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
customcommand 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 codeThen if
availableCommandsis 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