Opened 13 years ago

Closed 13 years ago

#9005 closed Bug (invalid)

WYSIWYG Area won't initialize correctly inside a jQuery UI Dialog (Webkit & Firefox)

Reported by: Florian Ignaz Eßl Owned by:
Priority: Normal Milestone:
Component: General Version: 3.6.3
Keywords: Cc:

Description

OS: Win7, Browsers tested: Google Chrome 19, Firefox 12

If CKEDITOR is initialized inside a jQuery UI Dialog the WYSIWYG Area is just empty and editing is impossible until the display mode is switched manually via the "Source code" button. Resizing, clicking on formatting options will result in exceptions:

"this.document.getWindow().$.xxxxxx" -> "Cannot call method xxxxxx of undefined"

In IE9 everything seems to work as expected.

A short example is provided as attachment.

Attachments (2)

main.html (1.0 KB) - added by Florian Ignaz Eßl 13 years ago.
dialog.html (441 bytes) - added by Florian Ignaz Eßl 13 years ago.

Download all attachments as: .zip

Change History (3)

Changed 13 years ago by Florian Ignaz Eßl

Attachment: main.html added

Changed 13 years ago by Florian Ignaz Eßl

Attachment: dialog.html added

comment:1 Changed 13 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

HI,

Your effects are to blame here:

show: "blind",
hide: "fade",

Removing them resolved the problems also setting timeout in dialog.html did the trick

setTimeout(function(){
	var editor = CKEDITOR.instances['htmlEditor'];
        ...
        editor.on('instanceReady', function(ev){
		ev.editor.setData('<p>Lorem ipsum</p>');
	});
},2000); 

You should either remove those effects or call CKEditor in callback function for those effects (if there is one).

Please also note that with actions like setting editors data it's best to make them after CKEditor has full loaded

editor = CKEDITOR.replace('htmlEditor');
editor.on('instanceReady', function(ev){
	ev.editor.setData('<p>Lorem ipsum</p>');
});
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy