value
Gets or sets the text value in the message box input field. When called without arguments, returns the current input value. When called with a string argument, sets the input value.
Parameters
newValue String (optional)
The new text value to set in the message box input. If omitted, the method acts as a getter.
Returns
String - The current value of the message box input when used as a getter.
Example
<div id="chat"></div>
<button id="getBtn">Get Value</button>
<button id="setBtn">Set Value</button>
<script>
let chat = $("#chat").kendoChat({
authorId: "user1"
}).data("kendoChat");
$("#getBtn").on("click", function() {
console.log("Current value:", chat.value());
});
$("#setBtn").on("click", function() {
chat.value("Hello from the API!");
});
</script>