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

Ai.inlineAIPrompt

configuration

Defines the configuration options for the inline AI Prompt tool in the Editor. If set to false, the inline AI Prompt tool is disabled.

ai.inlineAIPrompt

Object|Boolean
<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  ai: {
    inlineAIPrompt: {
      // configuration options
    }
  }
});
</script>

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>

Defines the system prompt for the inline AI Prompt tool. The function accepts the following arguments:

  • context - The selected text in the editor.
  • prompt - The user prompt.
<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  ai: {
    inlineAIPrompt: {
      systemPrompt: (context, prompt) => `You are an advanced AI language assistant.
                            A user has selected a portion of their text and provided a query regarding how they want it modified.
                            Your task is to accurately respond to their request while preserving the original intent of the text.
                            Follow the instructions strictly and provide only the requested output unless explicitly asked to explain your changes.


      Selected Text:
                            ${context}


      User's Request:
      ${prompt}

      Response:`
    }
  }
});
</script>