First of all, many thanks for a great tool!
I have this test page:
By pressing "Create FCKeditor" it puts the FCKeditor's iframe on page and "Remove FCKeditor" removes it. I want to be able to recreate FCKeditor (Create->Remove->Create). This works fine in IE but not in Firefox (it throws a "FCKTools is not defined" error).
Is there a way to make it work for Firefox too? Keep in mind that this is a test page that isolates the problem, I'm not interested in just hiding the iframe, I want to be able to remove it from the page.
I have this test page:
<html> <body> <form id="Form1" method="post"> <input type="button" onclick="create();" value="Create FCKeditor" ID="Button1" NAME="Button1"> <input type="button" onclick="remove();" value="Remove FCKeditor" ID="Button2" NAME="Button2"> <div> Html to create: <input type="text" name="txthtml" value='<iframe id="fckPageContent___Frame" src="FCKeditor/editor/fckeditor.html?InstanceName=fckPageContent&Toolbar=Default" width="100%" height="500px" frameborder="no" scrolling="no"></iframe>' ID="Hidden2" size="137"> </div> <input type="hidden" id="fckPageContent" name="fckPageContent"><input type="hidden" id="fckPageContent___Config" NAME="fckPageContent___Config"> <div id="panel"></div> <script language="javascript"> __IFramesStore = new Array(); function remove() { elem = document.getElementById("panel"); var frame = elem.childNodes[0]; // store the frame to avoid javascript error in IE if (!__IFramesStore[frame.id]) __IFramesStore[frame.id] = frame; elem.innerHTML=""; } function create() { elem = document.getElementById("panel"); elem.innerHTML = document.forms[0]["txthtml"].value; } </script> </form> </body> </html>
By pressing "Create FCKeditor" it puts the FCKeditor's iframe on page and "Remove FCKeditor" removes it. I want to be able to recreate FCKeditor (Create->Remove->Create). This works fine in IE but not in Firefox (it throws a "FCKTools is not defined" error).
Is there a way to make it work for Firefox too? Keep in mind that this is a test page that isolates the problem, I'm not interested in just hiding the iframe, I want to be able to remove it from the page.
RE: recreate FCKeditor by javascript
Sorry about the encoded html.
You can get the html page that I posted at http://www.magicajax.net/site/fcktest.html.
It won't work online. All you have to do is just to include the FCKeditor's folder on the same folder as the html file.