outputActionsArray(default: ["copy", "retry"])

An array of action configurations for the output cards. Can contain strings for built-in actions or objects with custom action properties.

Built-in actions:

  • "copy" - Copy output content to clipboard
  • "retry" - Retry generating the output
  • "rating" - Expands to both positive and negative rating buttons
  • "ratingPositive" - Renders the positive rating button
  • "ratingNegative" - Renders the negative rating button
  • "spacer" - Adds spacing between action buttons

Custom actions trigger the outputAction event with the action command and output data.

Example - Built-in actions

<div id="aiprompt"></div> <script> $("#aiprompt").kendoAIPrompt({ outputActions: ["copy", "retry", "rating"] }); </script>

Example - Custom actions

<div id="aiprompt"></div> <script> $("#aiprompt").kendoAIPrompt({ outputActions: [ "copy", "retry", { command: "export", text: "Export", icon: "download" }, "spacer", { command: "share", text: "Share", icon: "share" } ], outputAction: function(e) { if (e.command === "export") { // Handle export action // e.output contains the text content directly console.log("Exporting output ID:", e.outputId); console.log("Content:", e.output); console.log("Original prompt:", e.prompt); } else if (e.command === "share") { // Handle share action console.log("Sharing output:", e.output); } } }); </script>
In this article
outputActionsRelated Properties
Not finding the help you need?
Contact Support