php经验之-在kindeditor取得里面的textarea 值
php经验之-在kindeditor取得里面的textarea 值|浏览:123|更新:2014-05-29 12:04有时候需要更新kindeditor 里面的值,弄了老半天里面的值也没变换好,查了下官网手册,解决办法很简单,在这个 editor 的定义后面加上这段代码就可以了··
?
aftercreate : function() {
? ? ? ? this.sync();
? ? ? ?},
? ? ? ?afterblur:function(){
? ? ? ? ? ?this.sync();
? ? ? ?}?
?
?
例如: ?
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();
? ? ? ?}
});
});