Home  >  Article  >  Backend Development  >  PHP心得之-在kindeditor取得里面的textarea 值

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

WBOY
WBOYOriginal
2016-06-13 12:20:26924browse

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();

? ? ? ?} ??

});

});

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn