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

AIQuickActionsConfig

Api-interface iconinterface

The configuration of the AI Quick Actions feature.

The properties defined in this config are set in the config.ai.quickActions namespace.

ClassicEditor
	.create( {
		ai: {
			quickActions: {
				// AI Quick Actions configuration.
			}
		}
	} )
	.then( ... )
	.catch( ... );
Copy code

See the full AI configuration.

See all editor options.

Properties

  • Chevron-right icon

    The extra commands to add to the AI Quick Actions feature to become available for the user. You can fine-tune the commands by specifying the type, prompt, and other properties. By default, the extra commands land in the "Other" group in the user interface.

    The following example will add 3 new commands to the AI Quick Actions feature:

    ClassicEditor
    	.create( {
    		// ... Other configuration options ...
    		ai: {
    			quickActions: {
    				extraCommands: [
    					{
    						id: 'add-quote-from-famous-person',
    						label: 'Add a quote from a famous person',
    						prompt: 'Add a quote from a known person, which would make sense in the context of the selected text.',
    						type: 'action',
    						model: 'claude-4-sonnet'
    					},
    					{
    						id: 'summarize-in-bullet-points',
    						label: 'Summarize',
    						displayedPrompt: 'Summarize in 5 bullet points',
    						prompt: 'Summarize the selected text in 5 bullet points.',
    						type: 'chat'
    					},
    					{
    						id: 'include-more-sarcasm',
    						label: 'Add sarcasm',
    						prompt: 'Rewrite using a sarcastic tone.',
    						type: 'action',
    						model: 'claude-4-sonnet'
    					}
    				],
    			},
    		}
    	} )
    	.then( ... )
    	.catch( ... );
    
    Copy code
  • Chevron-right icon

    isSearchEnabled : boolean | undefined

    Whether to enable search functionality in the AI Quick Actions dropdown.

    When enabled, users can search through available quick actions using a search input field. When disabled, the search input is hidden and all actions are displayed in a list.

    Defaults to true

  • Chevron-right icon

    removeCommands : Array<string> | undefined

    The ids of the commands to remove from the AI Quick Actions feature. Removing all commands from a specific category will remove the category from the user interface.

    The defaults are as follows:

    • 'ask-ai,
    • "Chat commands" category
      • 'explain',
      • 'summarize',
      • 'highlight-key-points',
    • 'improve-writing',
    • 'continue',
    • 'fix-grammar',
    • "Adjust length" category
      • 'make-shorter',
      • 'make-longer',
    • "Change tone" category
      • 'make-tone-casual',
      • 'make-tone-direct',
      • 'make-tone-friendly',
      • 'make-tone-confident',
      • 'make-tone-professional',
    • "Translate" category
      • 'translate-to-english',
      • 'translate-to-chinese',
      • 'translate-to-french',
      • 'translate-to-german',
      • 'translate-to-italian',
      • 'translate-to-portuguese',
      • 'translate-to-russian'

    The following example will remove the "Explain" and "Summarize" commands from the user interface:

    ClassicEditor
    	.create( {
    		// ... Other configuration options ...
    		ai: {
    			quickActions: {
    				removeCommands: [
    					'explain',
    					'summarize',
    					// ...
    				]
    			},
    		}
    	} )
    	.then( ... )
    	.catch( ... );
    
    Copy code