KindEditor配置ctrl+enter提交

今天花费了一些时间去想怎么配置,网上也没有直接找到这方面的资料。后面突然看到一个网页,提交也是用了相同的编辑器。就学习了一下。

//创建编辑器

function createEditor(){
KindEditor.ready(function(K) {
ChatEditor = K.create('textarea.win_chat_textarea', {width : '100%',
filterMode : true,
resizeType : 0,
langType : 'zh_CN',
designMode : true,
pasteType : 2,
uploadJson : rootpath + '/kindeditor/jsp/upload_json.jsp',
fileManagerJson : rootpath + '/kindeditor/jsp/file_manager_json.jsp',
allowFileManager : true,
items : [ 'emoticons','|','fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
'italic', '|', 'image', '|', 'messageRecord' ],
colorTable : [
[ '#E53333', '#E56600', '#FF9900', '#64451D', '#DFC5A4', '#FFE500' ],
[ '#009900', '#006600', '#99BB00', '#B8D100', '#60D978', '#00D5FF' ],
[ '#337FE5', '#003399', '#4C33E5', '#9933E5', '#CC33E5', '#EE33EE' ],
[ '#FFFFFF', '#CCCCCC', '#999999', '#666666', '#333333', '#000000' ] ],
themeType : 'chat' ,
afterCreate : function(){
K.ctrl(this.edit.iframe.get(0).contentWindow.document, 13, function() {
alert(13);//这个地方添加提交校验事件
});

}
   });
});
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值