Lest my question is not clear; I don't mean dynamically replacing <p>
nodes with <textarea>
. I mean editing each and all text directly - including headers, text in <div>
and <span>
and yes editing tables. I know this is possible in IE and I have a script which switches between editable and back which works in IE, but that doesn't work in Firefox. Is there any way to make it work in FF?
P.S. The script for IE I got from JavaScript Bible Gold Edition by Danny Goodman, 2001
In firefox > 3 you can use contentEditable for html elements I understood. A tag looks like this:
<div id="myEditableDiv" contentEditable="true">click here to edit ...</div>
you can control the editing process with 'execCommand' (see: msdn for command identifiers)