Opened 12 years ago

Closed 12 years ago

#9081 closed Bug (invalid)

U is not a function error

Reported by: krishnank Owned by:
Priority: Normal Milestone:
Component: UI : Dialogs Version: 3.6.2
Keywords: Cc: knimmagadda@…

Description

The following code displays "U is a not a function" error in the browser (firefox).

CKEDITOR.on( 'instanceReady', function( ev ) {

ev.editor.on( 'doubleclick', function( event ) {

var r=event.data.element; if(r.is('div')) {

var dialogObj =

new CKEDITOR.dialog(CKEDITOR.instances.editor1 , 'pomaccordion' );

dialogObj.show();

}

});

});

Attachments (1)

UNotFunction.JPG (13.7 KB) - added by krishnank 12 years ago.
When double clicked on DIV element, the error is displayed.

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by krishnank

Attachment: UNotFunction.JPG added

When double clicked on DIV element, the error is displayed.

comment:1 Changed 12 years ago by krishnank

When double clicked on DIV element, the error is displayed.

comment:2 Changed 12 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

Dialogs are lazy loaded so your code will only work if smiley dialog was loaded into editor before running this code.

Instead of

var dialogObj = new CKEDITOR.dialog(CKEDITOR.instances.editor1 , 'pomaccordion' );
dialogObj.show();

you should use

event.editor.execCommand( 'pomaccordion'); 
or
event.editor.openDialog( 'pomaccordion' );
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