0
votes

I'm trying to use a CKEDITOR instance into a jqueryUI dialog.

$('[name=dialog]').dialog();
$('[name=content]','[name=dialog]').ckeditor();

It works fine until i want to use the dialogs from the editor (f.e. dialog to set an URL, dialog to create a table)

it's like i can't click on that dialog..

i was checking for the z-index (i think that is the problem) but nothing, it is the highest level and nothing, i can not use those dialogs.

Anybody knows why is this for?

2

2 Answers

1
votes

I know this post is a little late, but maybe it'll help the next guy. To create a ckeditor instance in a dialog, you have to load the dialog first and then create ckeditor like this:

$("#mydialog").dialog({
    open: function() {
         $("#mytextarea").ckeditor(); //LOAD IT HERE
    },
    close: function() {
       //you might want to destroy the instance once the dialog closes 
       //to keep things clean
       CKEDITOR.instances["mytextarea"].destroy();
    },
    autoOpen: true, ... more options
});

Hope this helps.

0
votes

Its easy, just the next code ( sorry for the formatting, but I'm replying using my mobile )

$("<div><textarea id='foo'></textarea></div>").dialog({});
CKEDITOR.replace("foo");