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

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.
  • "discard" - Clears the output content and closes the popup.

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

Parameters

action String

The output action that has initiated the given operation.

content String

The currently present output content.

Example - Built-in actions

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

Example - Custom actions

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