I've built a small class in Javascript that changes the HTML nodes (i.e. HTML tags) location. I call it "Nodes Handler".
The nodes moving is done with the replaceChild() function and the insertRow() function (both JS functions of course).
The HTML structure is as follows:
- Code: Select all
<table id="myTable">
<tr><td>
<table><tr>
<td class="delete">Remove</td>
<td>
<textarea class="wymeditor">data...</textarea>
</td>
<td class="up">Up</td>
<td class="down">Down</td>
</tr></table>
</td></tr>
</table>
( I didn't write the JS code of the Nodes Handler class because that I didn't think it's needed. If you want me to post it, no problem, just write and I will post it + a sample that show how it works).
When using a simple textarea (not a wymeditor textarea), the script works OK and the data is saved.
But when using the WYMeditor instead of the simple textarea, the data is lost after changing the location of the editor (moving it up or down in the DOM tree).
I want to keep this feature of the Nodes Handler in my system, but this problem really bugs me.
Is there any way to fix it?
Thanks in advance,
Dor.