function add(){
  $("#zong").append("<textarea id='a'></textarea>");
   KE.show({
id : 'a',
resizeMode : 1,
allowPreviewEmoticons : false,
allowUpload : false,
items : [
'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist']
});
  }似乎取不到id

解决方案 »

  1.   

    show 方法 在这个时候用,已经没有任何用处了试下 create
      

  2.   

    这里用的namevar editor;

    KindEditor.ready(function(K) {
    editor = K.create('textarea[name="content"]', {
    resizeType: 1,
    allowPreviewEmoticons: true,
    allowImageUpload: true,
    items: ['fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'emoticons', 'image', 'link']
    });
    });