最开始在页面上使用一个 kindeditor编辑器,没有遇到什么问题。后面需要使用2个的时候。首先我的代码是这样写的;
<tr>
<th width="80">简介</th>
<td>
<textarea name="introduction" id="introduction" >{pigcms{$news.introduction}</textarea>
</td>
</tr>
<tr>
<th width="80">内容</th>
<td>
<textarea name="content" id="content" >{pigcms{$news.content}</textarea>
</td>
</tr>
JS代码如下:
KindEditor.ready(function(K){
kind_editor = K.create("#content",{
width:'402px',
height:'320px',
resizeType : 1,
<if condition="$_GET['frame_show']">readonlyMode : true,</if>
allowPreviewEmoticons:false,
allowImageUpload : true,
filterMode: true,
items : [
'source', 'fullscreen', '|', 'fontname', 'fontsize',

本文档介绍了如何在一个页面上同时使用多个Kindeditor编辑器。最初遇到问题,但通过调整JS代码,实现了在数组中添加多个元素以创建多个编辑器实例。编辑器的工具栏显示也能自定义,只需修改items配置。查看官方文档获取更多详情。
最低0.47元/天 解锁文章
3376

被折叠的 条评论
为什么被折叠?



