But I wouldn't want to do that on a regular basis! ending up with an HTML file clean enough to actually work with.
Through some extremely difficult maneuvers, it's possible to convert a Pages (or Word) file to HTML, open it in TextEdit, and save it two or three times in order to cleanse the file of its nonstandard and genuinely ugly underlying code. Not to pick on Microsoft unduly, as Apple takes the same approach with Pages, which converts its beautifully-formatted documents to HTML using CSS styles so verbose and convoluted (yet so WYSIWYG accurate) that no self-respecting webmaster would ever want to claim ownership of the code, much less actually post it on a server. Word insists on inserting invalid - or simply overly heavy-handed - CSS styles in order to produce HTML that matches the look and feel of the original Word document, and to my knowledge, it provides no way to bypass this.
This preference has been available since at least 10.4.6, but I don't know how long before that.Īny of you who've struggled with converting Word documents to HTML over the years know what a pain it has been.
I just discovered, to my great relief, that TextEdit can convert rich text constructed using the native Cocoa text, font, and style features (including lists and tables) to well-formed HTML by selecting the proper setting in the Open and Save tab of TextEdit's Preferecnes window.