Typedef

CommandDefinition (ai)

@ckeditor/ckeditor5-ai/src/aiassistant

typedefobject

Filtering

Properties

  • id : string

    The unique identifier of the command. It can be referenced while removing commands. See removeCommands to learn more.

  • label : string

    The human-readable label of the command.

  • order : number | undefined

    The order of the command on the list. The lower the number, the higher the command is displayed on the list. If not specified, the position of this command will be determined by the order of configuration.

    If a new command is added without order property, it will be added at the end of the group.

    The order uses zero-based numbering (the first command's order is 0).

  • prompt : string

    The instruction that will be passed to the AI model.

    It is wrapped in a "full prompt template" for better results.

  • requiresContent : boolean | undefined

    By default, all commands require a selection for the assistant to work on. If the selection is collapsed, it automatically expands to the nearest block boundaries to provide the AI context.

    Setting this to false allows the command to work on a collapsed selection and prevent selection expansion. This is helpful, for instance, for commands that generate content from scratch.

    Note: If not specified, the default is true.