Pierre
Pierre

Reputation: 5156

Ckeditor 4 - How to callback selected file/image in custom browser?

With Ckeditor3, when implementing your own file/image browser, to send back the file URL back to CKeditor, you would call :

window.opener.CKEDITOR.tools.callFunction(2,filename);

But it seems with Ckeditor4 this does not work anymore, even though the docs still says it's working...

Any help?

Upvotes: 1

Views: 4497

Answers (2)

user3281733
user3281733

Reputation: 111

In this line

window.opener.CKEDITOR.tools.callFunction(CKEditorFuncNum,filename);

CKEditorFuncNum should be the value sent to the file browser via url param with the same name i.e &CKEditorFuncNum=4 - in this case 4 will be the first argument for callFunction().

Upvotes: 3

Pierre
Pierre

Reputation: 5156

Ok it seems like the problem is the "2" hard coded... as mentioned here

I solved it by using the example 2 function from the docs mentioned in my question

Upvotes: 0

Related Questions