主题: keyup怎么绑定(4.1.3),之前您的方法没用..
作者: anangfish, 发布日期: 2012-11-04 19:23:09, 浏览数: 3417
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Simple Examples</title>
<style>
form {
margin: 0;
}
textarea {
display: block;
}
</style>
<script charset="utf-8" src="../kindeditor-min.js"></script>
<script charset="utf-8" src="../lang/zh_CN.js"></script>
<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name="content"]', {
afterCreate : function() {
K(editor.edit.doc).keyup(
function(e) { 
alert('test'); 
});},
resizeType : 1,
allowPreviewEmoticons : false,
allowImageUpload : false,
items : [
'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'image', 'link']
});
});
</script>
</head>
<body>
<h3>默认模式</h3>
<form>
<textarea name="content" style="width:700px;height:200px;visibility:hidden;">KindEditor</textarea>
</form>
</body>
</html>


绑定没用啊老大,你试试看

kindeditor-4.1.3

作者: Roddy, 发布日期: 2012-11-04 22:39:52
editor.edit.doc 改成 this.edit.doc 试试。
回复
作者: anangfish, 发布日期: 2012-11-05 19:16:39

回复Roddy:

可以,谢谢

回复
发表新帖 发表回复