// 聊天内容输入框
this.$inputMessage = $('#im-panel-inputcontent');
this.$inputMessage.keydown(function (event) {
// Auto-focus the current input when a key is typed
if (!(event.ctrlKey || event.metaKey || event.altKey)) {
if (!IMSDK.isLogined()) {
//that.$inputMessage.focus();
RBChatUtils.setTextFocus(that.$inputMessage);
}
}
// When the client hits ENTER on their keyboard
if (event.which === 13) {
// 按Crtl+Enter发送消息
if (event.ctrlKey) {
}
// 按Enter时换行
else {
that.$inputMessage.val(that.$inputMessage.val() + '\n');
}
}
});
textarea回车换行,发送
于 2023-07-11 17:42:10 首次发布