Handle core:copy in preview view

This writes the HTML of the preview to the clipboard