主题: 无法调用editor.text() |
作者: zaric, 发布日期: 2012-12-18 18:58:49, 浏览数: 2230 |
操作系统:
Windows 8 浏览器版本: chrome 23 KindEditor版本: 4.1.4 BUG再现步骤: 1. <script charset="utf-8" src="<%=contextPath %>/resources/jquery-1.6.4.min.js"></script> <script charset="utf-8" src="<%=contextPath %>/resources/kindeditor/kindeditor.js"></script><script charset="utf-8" src="<%=contextPath %>/resources/kindeditor/lang/zh_CN.js"></script> <script> var editor; KindEditor.ready(function (K) { editor = K.create( 'textarea[name="content"]', { resizeType: 0, // 2时可以拖动改变宽度和高度,1时只能改变高度,0时不能拖动 readonlyMode: false, //只读模式 默认为false allowPreviewEmoticons: false, autoHeightMode: true, uploadJson: '../resources/kindeditor/jsp/upload_json.jsp', fileManagerJson: '../resources/kindeditor/jsp/file_manager_json.jsp', allowFileManager: true, afterChange: function () { var strValue = editor.text(); if (strValue.length() > 300) { document.getElementsByName('summary').value(strValue.substring(0, 300)); } else { document.getElementsByName('summary').value(strValue); } }, afterCreate: function () { this.loadPlugin('autoheight'); this.loadPlugin('insertfile'); } }); }); </script> 2. Kindeditor无法编辑
3. 无法调用editor.text() var strValue = editor.text();
|