Hello,
I have the editor on one page working fine. I can highlight some text, click a button and a new window pops open from which I can choose where to link the text I higlighted.
However, If I select an image in the opener window, a new window pops as it should with the same functionality; I can select a document to link the image to. But, it does not work with an image selected in the opener window.
I know next to nothing on FCKEditor code. I'm trying to fix someone else's code. Here's the code that is supposed to link the opener selection text (or image) to what I select in the child window:
if (document.all)
{
alert(window.opener.FCK.EditorDocument.selection.createRange().text);
window.opener.FCK.InsertHtml(preText + window.opener.FCK.EditorDocument.selection.createRange().text + postText);
}
else
{
window.opener.FCK.InsertHtml(preText + window.opener.FCK.EditorWindow.getSelection() + postText);
}
Can someone help?
Thanks,
Mike
I have the editor on one page working fine. I can highlight some text, click a button and a new window pops open from which I can choose where to link the text I higlighted.
However, If I select an image in the opener window, a new window pops as it should with the same functionality; I can select a document to link the image to. But, it does not work with an image selected in the opener window.
I know next to nothing on FCKEditor code. I'm trying to fix someone else's code. Here's the code that is supposed to link the opener selection text (or image) to what I select in the child window:
if (document.all)
{
alert(window.opener.FCK.EditorDocument.selection.createRange().text);
window.opener.FCK.InsertHtml(preText + window.opener.FCK.EditorDocument.selection.createRange().text + postText);
}
else
{
window.opener.FCK.InsertHtml(preText + window.opener.FCK.EditorWindow.getSelection() + postText);
}
Can someone help?
Thanks,
Mike