首頁  >  文章  >  後端開發  >  PHP心得之-在kindeditor取得里面的textarea 值

PHP心得之-在kindeditor取得里面的textarea 值

WBOY
WBOY原創
2016-06-13 12:20:26924瀏覽

PHP经验之-在kindeditor取得里面的textarea 值

PHP经验之-在kindeditor取得里面的textarea 值

  • |
  • 浏览:123
  • |
  • 更新:2014-05-29 12:04

有时候需要更新kindeditor 里面的值,弄了老半天里面的值也没变换好,查了下官网手册,解决办法很简单,在这个 editor 的定义后面加上这段代码就可以了··

?

afterCreate : function() {

? ? ? ? this.sync();

? ? ? ?},

? ? ? ?afterBlur:function(){

? ? ? ? ? ?this.sync();

? ? ? ?}?

?

?

例如: ?<script></script>

var editor;

var isWl = 1 ;

KindEditor.ready(function(K) {

editor = K.create('textarea', {

allowFileManager : true ,

filterMode : false ,

urlType : 'domain' ,

afterCreate : function() {

? ? ? ? this.sync();

? ? ? ?},

? ? ? ?afterBlur:function(){

? ? ? ? ? ?this.sync();

? ? ? ?} ??

});

});

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn