Exporting Cappuccino views to HTML

On the way to implementing PDF export, I needed to be able to transform Mockingbird pages into static HTML.  So, I added a simple category to CPView.  This category creates a cloned DOMElement of the CPView's DOMElement that has the canvas elements converted to PNG images.  I then use XMLSerializer to serialize and send this data to my server.  You can get the gist of it here - http://gist.github.com/253272 .

This uses Nihilogic's Canvas2Image library, which requires base64.j .  The one problem with this code is it won't work in IE since it requires a canvas-enabled browser.

In the meantime, hope this can help someone else trying to do something similar =).

Posted