});
}
}
private String renderPreview() {
Renderable renderable = context.lookup(Renderable.class);
String previewText;
try {
Set<RenderOption> renderOptions = EnumSet.of(
RenderOption.PREFER_EDITOR,
RenderOption.RESOLVE_IMAGE_URLS);
if (!htmlView.isHtmlFullySupported()) {
renderOptions.add(RenderOption.SWING_COMPATIBLE);
}
previewText = renderable.renderAsHtml(renderOptions);
} catch (IOException ex) {
previewText = "Preview rendering failed: " + ex.getMessage();
}
return previewText;
}