Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#8383 closed Bug (invalid)

E.setCustomData is not a function with 2 editors in one page and custom image lib

Reported by: Martin Nikolov Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

Hello. I have 2 editors in one page and i have custom image library. Both editors have links to the image library and upload scripts, but when I try to choose a picture from the library, which i do with simple a tag that have href like this: javascript: window.opener.CKEDITOR.tools.callFunction(4, '/path/to.jpg', ); window.close(); That thing works with the second editor (the old one, i added a second because i needed two textareas in my form). But with the new one it doesn't set the picture and doesn't close the window. Firebug says: E.setCustomData is not a function Can someone help me with this issue?

Change History (2)

comment:1 Changed 8 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

First of all if you are seeking help please use one of our forums (http://cksource.com/forums/viewforum.php?f=1) and not tracker for reporting bugs.

About your problem:

E.setCustomData is not a function

it means that you are trying to invoke setCustomData method on object "E" which doesn't have such method. Object E is either wrong or perhaps it has been changed (E.g. set to null) somewhere in your code.

That thing works with the second editor

Perhaps when applying your functionality to the second editor you overwrite the one that is attached to the first editor.

comment:2 Changed 8 years ago by Martin Nikolov

Hello. Thanks for the answer. First of all I like to say that i asked in the forums, but I had no answer. That leads me here. At least i've got some answer here. So about the problem. As I write i have manually setting the url back, only with different url path. Today I followed the docs and found that it should be something different - I had the javascript: window.opener...callFunction(4, '/path...'); which is a little wrong. It appears that the first param is the function number (i know that, i didn't know that this function is different for the different instances). So here is the solution: I parsed the GET params and put the one it needed. That solved my problem. I hope this will help someone.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy