简体   繁体   中英

How do I take a CKEditor UI element and turn it into a JQuery object?

CKEDITOR.dialog.add('quoteDialog',function(editor){
return{  //... ... code here
    onShow:function(){
        var dialog = this;
        var bg_box = dialog.getContentElement('general','color_box');
        $(bg_box)???
    }
}
});

OK, I got the element! But how do I turn it into a JQuery object?

You can change CKEditor object (or object array) to JQuery object (or object array)

See example code

CKEditor object list:- var elmnts= CKEDITOR.instances.editor1.editable().find('img');

JQuery object list:- var elmnts= CKEDITOR.instances.editor1.editable().find('img').$;

I found the solution to my problem:

$(bg_box._.inputId);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM