How can I append text to html source in CKEditor?

后端 未结 4 1680
没有蜡笔的小新
没有蜡笔的小新 2021-02-15 20:42


I use CKEditor in my web-application. By click on one link i appends some text to CKEditor. It works fine. But when I open source tab, i can not append this te

4条回答
  •  情歌与酒
    2021-02-15 21:12

    Other sample working function :

    
      function insertIntoCkeditor(str,url){
    
      var tagHtml = ''+str+'';
    
        //CKEDITOR.instances['bilgi'].insertText(tagHtml);
        CKEDITOR.instances['bilgi'].insertHtml(tagHtml);
        //CKEDITOR.instances.body.insertElement(tagHtml);
      }
    
    onclick="insertIntoCkeditor('Parakazan','Http://www.parakazan.org')"> 
    
    
    

提交回复
热议问题