tags:

views:

1187

answers:

1

I have a plug in in the old FCKEditor I would like to rebuild. I saw an example that leveraged the iFrame code. The I've got the button defined and working, I get the dialog, but I cannot figure out how to get the selected text/html into the dialog so I can manipulate it.

My plug in is an approximaiton of the MS File dialog box. When the user clicks on a file that is listed (or an html page in the list) my code updates the link text box with the URL to be used in the HREF property... I cannot find anything that will tell me how to get selected text from the editor and replace it with the edited code once my dialog does it's work... Any suggestions? I am intermediate with this so if you post code please comment on what's happening so I can understand. Thanks.

A: 

Seems my cookies got cleared.... Here is an update. I use the following code:

CKEDITOR.instances.editor1.insertHtml('<a href=\x22www.google.com\x22>'
CKEDITOR.instances.editor1.getSelection().getNative() + '</a>');

I get the appropriate code pasted into the CKEditor instance on FireFox, but on IE (6.0 here at the office) it posts [object Object] and the source URL displays:

<a href="www.google.com">[object Object]</a>

Is there some issue i am missing? I am on CKE3.0 and will be downloading 3.01 but their changelog did not seem to have anything related to this so I am not sure if this is a bug or not.

CPCase