Using jQuery to grab the content from CKEditor's iframe

前端 未结 11 1609
既然无缘
既然无缘 2020-11-29 01:20

I have a custom-written CMS that uses CKEditor *(FCKEditor v3) for editing content. I\'m also using the jQuery Validation plugin to check a

11条回答
  •  感情败类
    2020-11-29 02:02

    I took a slightly different approach I figured it would be better to use ckeditor's update function and since keyup was being used the timeout wasn't needed

    CKEDITOR.instances["editor1"].on("instanceReady", function()
    {
    //set keyup event
    this.document.on("keyup", CK_jQ);
    
     //and paste event
    this.document.on("paste", CK_jQ);
    }
    
    function CK_jQ()
    {
       CKEDITOR.instances.editor1.updateElement(); 
    }
    

提交回复
热议问题