commandsArray

The commands to display in the Prompt's Context Menu.

Example

<div id="inlineaiprompt"></div>
<script>
$("#inlineaiprompt").kendoInlineAIPrompt({
    commands: [
                  {
                    id: "funnier",
                    text: "Make the text funnier with a lot of sarcasm",
                    icon: "star",
                    prompt: (selection) => `Make the following text funnier: ${selection}`
                  },
                  {
                    id: "change-tone",
                    text: "Change tone",
                    icon:() => {return kendo.ui.icon({icon: "minus", type:"svg" }) },
                    items: [
                        {
                            id: "change-tone-neutral",
                            text: "Neutral",
                            prompt: (selection) => `Adjust the tone of the following text to be more neutral while preserving its original meaning and intent.

                                    Selected Text:
                                    ${selection}`
                        },
                        {
                            id: "change-tone-friendly",
                            text: "Friendly",
                            prompt: (selection) => `Adjust the tone of the following text to be more friendly while preserving its original meaning and intent.

                                    Selected Text:
                                    ${selection}`
                        },
                        {
                            id: "change-tone-casual",
                            text: "Casual",
                            prompt: (selection) => `Adjust the tone of the following text to be more casual while preserving its original meaning and intent.

                                    Selected Text:
                                    ${selection}`
                        }
                    ]
                }
    ]
})
</script>
In this article
commandsRelated Properties
Not finding the help you need?
Contact Support