Make preview feature more generic

- previewEndpoint attribute is used to obtain formatted html
This commit is contained in:
OHTAKE Tomohiro committed 2011-11-07 15:54:54 +09:00
1 parent 9412373852
commit b4ad3fbfea
10 files changed
+23 -22

No files matched your search

@@ -103,9 +103,9 @@ public abstract class MarkupFormatter extends AbstractDescribableImpl<MarkupForm
* Generate HTML for preview, using markup formatter.
* Can be called from other views.
*/
public HttpResponse doPreviewDescription(@QueryParameter String description) throws IOException {
public HttpResponse doPreviewDescription(@QueryParameter String text) throws IOException {
StringWriter w = new StringWriter();
translate(description, w);
translate(text, w);
return HttpResponses.html(w.toString());
}
}