Re: Tip: full XHTML validation.
With regards to replacing tags such as <u> with style definitions, is there something wrong with a bit of code called on the save event that does the following?
<pseudo> for each node in the DOM if the node tag name is <u> then set the selection to outer HTML grab the inner HTML from the selection remove the parent tag from the selection using DOM commands if the parent tag isn't a <span> expand the inner HTML with <span style="text-decoration: underline;">inner HTML</span> else add the "text-decoration: underline;" attribute using DOM commands end if replace the selection end if next </pseudo>
This could quite easily be expanded to handle any tag and any replacement code from a config file...
I'm new to Tiny MCE so I don't know how the edit/cleanup/save procedure works yet. Also my DOM experience comes mostly from the evil world of IE proprietary code, so I'm not sure if some of the nice built-in DOM manipulation commands are supported in other browsers. So pardon my ignorance if it is ignorance. These are just some thoughts that came to mind after reading this thread.