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

AIQuickActionCustomActionDefinition

Api-interface iconinterface

A custom AI quick action definition.

An example of an action that inserts content in the editor:

{
	id: 'add-random-cat-fact',
	label: 'Add cat fact.',
	prompt: 'Add a random fact about cats to the document.',
	type: 'action',
}
Copy code

Optionally, action can have an AI model specified that it will use when run:

{
	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'
}
Copy code

Properties

  • Chevron-right icon

    id : string
    readonlyinherited

    The unique identifier of the action.

  • Chevron-right icon

    label : string
    readonlyinherited

    The human-readable label of the action.

  • Chevron-right icon

    model : string | undefined
    readonlyinherited

    The model to use for the action. If not specified, the default model will be used.

  • Chevron-right icon

    prompt : string
    readonlyinherited

    The prompt to be sent to the AI model when the action is executed.

  • Chevron-right icon

    type : 'action'

    The type of the action.