ai.inlineAIPrompt.commands.promptFunction

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

  • context - The selected text in the editor.

Example

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