so I am using the Rich Text Editor located here:
http://www.mozilla.org/editor/midasdemo/
and here
http://www.kevinroth.com/rte/demo.htm
anyway, I am building 'improved' table functionality.. right now I'm stuck on how I can retreive the node the cursor is a child of.
I am able to insert a table with both IE and Mozilla and I am able to modify the attribute of a TD elment in this fashion with IE:
Code:
oRTE = frames[rte]
oRTE.document.body.focus()
var selection = oRTE.document.selection;
rng = selection.createRange()
rng.parentElement().setAttribute('vAlign','top')
so then I am able to modify the attributes of a TD in any manner that I choose-- it'll probably end up being a layer/popup for a user to edit the 'desired' attributes.
But, I have been struggling trying to find a solution that would work with Mozilla. I wish it was as simple as 'getSelectedElement' .. and I try the getRangeAt() function with 0 as the argument and that claims to not be defined but it seems to work elsewhere in the script(it is not a typo, I'm not dyslexic and it still says it's undefined).
If I need to upload sample code for you to see what I'm doing better, let me know.