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

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

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  ai: {
    aiPrompt: {
      commands: [
        {
          id: "1",
          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: {
        aiPrompt: {
            commands: [{
                icon: "gear",
                text: "Summarize"
            }]
        }
    }
});
</script>

The id of the command.

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

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

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

The text of the command.

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