📌  相关文章
📜  清除 ckeditor textarea jquery - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:43.102000             🧑  作者: Mango

代码示例1
function CKupdate(){
    for ( instance in CKEDITOR.instances ){
        CKEDITOR.instances[instance].updateElement();
        CKEDITOR.instances[instance].setData('');
    }
}

$(document).ready(function(){   
    CKEDITOR.replace( 'comment-textarea' );

    var options = {
        success: function (html) {
            $('#comments').append(html);
        },
        clearForm: true 
    };

    $('#formcomments').submit(function() {
        CKupdate();
    });
    $('#formcomments').ajaxForm(options);
});