I am trying to use the [URL=”http://www.mozilla.org/editor/midasdemo/”]Midas editor
See, normally, the textbox has a “name” like everything in a regular form. So, once you write something in that textbox, you can easily pass the value to PHP like this:
[B]$content = $_POST[´textbox_name´];
Easy as pie. The problem is that the Midas text editor uses this:
[B]<iframe id=”edit” width=”100%” height=”200px”></iframe>
and whatever you type appears inside the iframe because the javascript has this:
[B]html = document.createTextNode(document.getElementById(‘edit’).contentWindow.document.body.innerHTML);
I tried giving a name to the Iframe, but $_POST is not getting what I type inside the iframe.
Another thing I tried was putting the value of document.createTextNode(document.getElementById(‘edit’).contentWindow.document.body.innerHTML); inside the value of a hidden type in the form:
<input type=”hidden” value=”<script>document.write( html = document.createTextNode(document.getElementById(‘edit’).contentWindow.document.body.innerHTML); );</script>” />
But that doesn’t work either. Should I ask in the Javascript forum? Or someone knows what to do? I am thinking of finding another text editor, but I like Mozilla’s, even though it is a demo.