error
Fired when an error occurs during SmartPasteButton processing.
Event Data
e.sender kendo.ui.SmartPasteButton
The widget instance which fired the event.
e.error String
The error message describing what went wrong.
Example - subscribe to the "error" event during initialization
<form id="form">
<input name="firstName" />
<button id="smartPasteButton"></button>
</form>
<script>
$("#smartPasteButton").kendoSmartPasteButton({
service: {
url: "https://your-ai-service.com/api/parse"
},
error: function(e) {
console.log("Error occurred: " + e.error);
}
});
</script>
Example - subscribe to the "error" event after initialization
<form id="form">
<input name="firstName" />
<button id="smartPasteButton"></button>
</form>
<script>
function onError(e) {
alert("Processing failed: " + e.error);
}
$("#smartPasteButton").kendoSmartPasteButton({
service: {
url: "https://your-ai-service.com/api/parse"
}
});
var smartPasteButton = $("#smartPasteButton").data("kendoSmartPasteButton");
smartPasteButton.bind("error", onError);
</script>