ai.aiPrompt.commands.promptFunction

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

  • context - The text in the editor.

Example

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
    ai: {
        aiPrompt: {
            commands: [{
                text: "Summarize",
                prompt: function(context) {
                    return "Please summarize the following text: " + context;
                }
            }]
        }
    }
});
</script>
In this article
ai.aiPrompt.commands.prompt
Not finding the help you need?
Contact Support