Are there Apple or third-party products that heavily rely on the current implementation of RemoveFormatCommand? If not, I want to completely re-implement RemoveFormat to match the behavior of other browsers.
In MSDN <http://msdn.microsoft.com/en-us/library/aa220275(office.11).aspx>, RemoveFormat is described as: > Removes the font and character formatting from the current selection. The following code removes all formatting from the selected text. > ActiveDocument.execCommand "removeformat In MDC <https://developer.mozilla.org/en/rich-text_editing_in_mozilla>, it's described as: > Removes all formatting from the current selection. However, our current implementation<http://trac.webkit.org/browser/trunk/WebCore/editing/RemoveFormatCommand.cpp#L49>deletes all selected contents and type them back in, losing all sorts of elements such as input, img, hyper links, tables, lists, and etc... There are two options to resolve this problem: 1. Store all elements deleted and their positions and insert (restore) them back. 2. Remove format more gracefully by walking through the DOM and removing stylesheets and presentational elements. I want to re-implement RemoveFormat because I don't think option 1 really is an option. Best Regards, Ryosuke Niwa
_______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

