KindEditor编辑器只读
taotaoit kindeditor 2021-05-03 1544 0
关于本站

“最难不过坚持”

本人承接扒站仿站,php网站维护,病毒查杀,网站编辑,网站改版,html制作

有需要网站维护,改版,病毒查杀,网站编辑,网站备案,html制作等相关的工作可以联系我。
本人有多年相关工作经验,也可提供免费咨询,交个朋友。
有需要探讨问题的朋友,也可以加我微信,共同探讨!
微信:15011482830 QQ:408917339

6476898 2614 39
最新评论
https://jueru.net/
评 留言
:weixiao:
评 留言
:shuijiao: :weiqu: :zhenbang: :leng:
评 留言
:yiwen: :yiwen: :yiwen: :yiwen:
评 EasySass: could not generate CSS file. See Output panel for details.
这个业务逻辑多少都有点奇怪了,阅读浏览次数增值在新闻详情页的控制器方法里setInc,这怎么还写进模型事件里了。如果非要用onAfterRead也可以,把新闻文章的内容单独分出来一个news_content表,然后把它和news做关联,然后给news_content表的onAfterRead事件做增值处理,这样点进新闻页内查询到文章内容时才会触发它。
评 TP6模型事件-查询后onAfterRead不好用
文章标签更多
ThinkPHP (254)
Mysql (58)
DedeCms (33)
jQuery (67)
证件照 (1)
setInc (4)
setDec (4)
onclick (5)
打开边栏(ESC) 关闭边栏(ESC)

只需要加一行editor1.readonly(true);就可以

完整代码

<script>
  $(function(){
    //编辑器
      KindEditor.ready(function(K) {
      editor1 = K.create('textarea[name="brandDesc"]', {
        height:'350px',
        uploadJson : WST.conf.ROOT+'/shop/brandapplys/editorUpload',
        allowFileManager : false,
        themeType : "default",
        items:[     'source', 'undo', 'redo',  'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
                  'plainpaste', 'wordpaste', 'justifyleft', 'justifycenter', 'justifyright',
                  'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                  'superscript', 'clearhtml', 'quickformat', 'selectall',  'fullscreen',
                  'formatblock', 'fontname', 'fontsize',  'forecolor', 'hilitecolor', 'bold',
                  'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', 'image','multiimage','media','table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
                  'anchor', 'link', 'unlink'
        ],
        afterBlur: function(){ this.sync(); }
      });
      editor1.readonly(true);
    });
  });
</script>

版权声明:本站原创文章,允许自由转载。

相关推荐
kindeditor批量图片上传,修改上传的数量和大小限制
kindeditor | 2017-08-03 5147
KindEditor批量图片上传,默认允许用户同时上传20张图片,单张图片容量不超过1MB。 有时不满足我们的需要,就需要修改KE批量上传图片的个数和单个图片大小限制。 KindEditor 4.1.11:  方法一:调用KE时配置好参数就行,代码如下: <link rel="stylesheet" h...
kindeditor编辑器插入程序代码后在<p>标签和<pre>标签间会多出一行<p><br></p>
kindeditor | 2020-04-26 4586
kindeditor编辑器插入程序代码后在<p>标签和<pre>标签间会多出一行<p><br></p> 导致前台显示的时候很难看。如下图: 我想实现的情况是1,但是出现的情况是2 而且初次提交代码没问题,当修改的时候用到“HTML代码”标签的时候,就会出现多...
评论:0条
评论加载中...
发表评论