After upgrading from ckeditor3 to ckeditor4, I have a problem in my custom link dialog. I am using the gui.js file that we used in our ckeditor implementation. When the link is saved, I get something like:
<a _cke_saved_href="yahoo.com" href="javascript:void(0)/*254*/">
We didn't change anything in this file from when we used ckeditor3. I have been poking around in the onOK function, can't figureout what's happening. Any thoughts on where to look?
more information... help requested!
I've narrowed it down (I hope) to the function "setAttributes". Even if I call it:
attributes is: Object {href: "http://yahoo.com", _cke_saved_href: "http://yahoo.com"}
element.setAttributes( attributes );
I wind up with the anchor tag:
<a _cke_saved_href="http://yahoo.com" href="javascript:void(0)/*254*/">
This is driving me nuts...
How are you reading back the
How are you reading back the data from the editor?
those special attributes are filtered out and they shouldn't be available when the HTML is generated.
This just happened on a
This just happened on a regular save - clicked "Ok" in the dialog window.
I got around the problem this morning, it seems. In the blocks of the "onOK" function, it set an attribute value for _cke_saved_href. I added another line that just duplicated that value, explicitely setting href to the same value, and that seemed to work. Not sure why. Immediately after clicking "OK", if I hit the "Source" button, now I see something like:
<a _cke_saved_href="http://yahoo.com" href="http://yahoo.com">
But then if I click back and forth between the Source mode, the _cke_saved_href goes away.
_cke_saved_href
Hi, i have the same problem in ckeditor4. Write please code, that you added for remove javascript:void(0) and achieve result <a _cke_saved_href="http://yahoo.com" href="http://yahoo.com">?