New to Kendo UI for jQueryStart a free 30-day trial

Defines the commands for the inline AI Prompt tool. The commands are displayed in the inline AI Prompt dropdown.

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  ai: {
    inlineAIPrompt: {
      commands: [
        {
          id: "funnier",
          text: "Make the text funnier",
          icon: "star",
          prompt: (context) => `Make the following text funnier: ${context}`
        }
      ]
    }
  }
});
</script>

The icon of the command.

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    ai: {
        inlineAIPrompt: {
            commands: [{
                icon: "sparkline",
                text: "Enhance"
            }]
        }
    }
});
</script>

The id of the command.

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    ai: {
        inlineAIPrompt: {
            commands: [{
                id: "enhance",
                text: "Enhance"
            }]
        }
    }
});
</script>

The prompt for the command. The function accepts the following arguments:

  • context - The selected text in the editor.
<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    ai: {
        inlineAIPrompt: {
            commands: [{
                text: "Enhance",
                prompt: function(context) {
                    return "Please enhance the following text: " + context;
                }
            }]
        }
    }
});
</script>

The text of the command.

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    ai: {
        inlineAIPrompt: {
            commands: [{
                text: "Enhance"
            }]
        }
    }
});
</script>