这个问题网上好多解答,都没有解决,在没有母板页的页面一切正常显示,在包含母版页的内容页中,不显示kindeditor编辑器框。
包含的母版页的部分代码:
<link rel="stylesheet" href="kditor/themes/default/default.css" type="text/css" />
<link rel="stylesheet" href="kditor/plugins/code/prettify.css" type="text/css" />
<script charset="gb2312" src="kditor/kindeditor.js" type="text/javascript"></script>
<script charset="gb2312" src="kditor/lang/zh_CN.js" type="text/javascript"></script>
<script charset="gb2312" src="kditor/plugins/code/prettify.js" type="text/javascript"></script>
内容页.aspx部分代码如下:
[C#] 纯文本查看 复制代码 <script type="text/javascript">
KindEditor.ready(function (K) {
var editor1 = K.create('textarea[name="content1"]', {
cssPath: 'kditor/plugins/code/prettify.css',
uploadJson: 'kditor/asp.net/upload_json.ashx',
fileManagerJson: 'kditor/asp.net/file_manager_json.ashx',
allowFileManager: true,
afterCreate: function () {
var self = this;
K.ctrl(document, 13, function () {
self.sync();
K('form[name=example]')[0].submit();
});
K.ctrl(self.edit.doc, 13, function () {
self.sync();
K('form[name=example]')[0].submit();
});
}
});
prettyPrint();
});
</script>
<textarea name="content1" id="content1" style="width:700px;height:350px;visibility:hidden;"></textarea>
把母版页的样式和三个JS文件转移到内容页,也不显示,不知道根本原因。
就是不显示,请指教。谢谢了。
kindeditor版本为最新版本 4.1.10。
|