if (pfx.equals("[")){
statusField.appendText(outPath + "\n");
}else {
String fullHTMLString = "";
try {
final Clipboard clipboard = Clipboard.getSystemClipboard();
final ClipboardContent content = new ClipboardContent();
// br fix required because html output-method seems to be affected by xhtml namespace
fullHTMLString = HTMLRender.getFileContent("file:///" + outPath).replace("<br></br>", "<br />");
fullHTMLString = fullHTMLString.replace("<body>", "<body style=\"background-color:#454545;\">");
int initStart = fullHTMLString.indexOf("style=") + 1;
int start = fullHTMLString.indexOf("style=", initStart) + 7;
int end = fullHTMLString.lastIndexOf("</pre>") + 6;
String divString = "<pre style=\"white-space: nowrap; ";
String preString = divString + fullHTMLString.substring(start, end);
content.putString(preString);
clipboard.setContent(content);
} catch (Exception e){}
eng.loadContent(fullHTMLString);
//eng.load("file:///" + outPath);
}
}