Does codeMirror have a method you can call to ask if the HTML is properly formatted (instead of this temporary div approach)?