WodParserCache cache = ((TemplateEditor) _editorInteraction.getHtmlDocumentProvider()).getSourceEditor().getParserCache();
FuzzyXMLDocument htmlDocument = cache.getHtmlEntry().getModel();
RenderContext renderContext = new RenderContext(true);
renderContext.setDelegate(new PreviewRenderDelegate(cache));
FuzzyXMLElement documentElement = htmlDocument.getDocumentElement();
documentContents = documentElement.toXMLString(renderContext);
} catch (Exception e) {
e.printStackTrace();
}
if (_browser != null) {