Search in sources :

Example 1 with JSPWikiMarkupParser

use of org.apache.wiki.parser.JSPWikiMarkupParser in project jspwiki by apache.

the class CreoleRendererTest method render.

private String render(String s) throws IOException {
    WikiPage dummyPage = new WikiPage(m_testEngine, "TestPage");
    WikiContext ctx = new WikiContext(m_testEngine, dummyPage);
    StringReader in = new StringReader(s);
    JSPWikiMarkupParser p = new JSPWikiMarkupParser(ctx, in);
    WikiDocument d = p.parse();
    CreoleRenderer cr = new CreoleRenderer(ctx, d);
    return cr.getString();
}
Also used : WikiContext(org.apache.wiki.WikiContext) JSPWikiMarkupParser(org.apache.wiki.parser.JSPWikiMarkupParser) WikiPage(org.apache.wiki.WikiPage) StringReader(java.io.StringReader) WikiDocument(org.apache.wiki.parser.WikiDocument)

Example 2 with JSPWikiMarkupParser

use of org.apache.wiki.parser.JSPWikiMarkupParser in project jspwiki by apache.

the class WysiwygEditingRendererTest method render.

private String render(String s) throws IOException {
    WikiPage dummyPage = new WikiPage(testEngine, "TestPage");
    WikiContext ctx = new WikiContext(testEngine, dummyPage);
    StringReader in = new StringReader(s);
    JSPWikiMarkupParser p = new JSPWikiMarkupParser(ctx, in);
    WikiDocument d = p.parse();
    WysiwygEditingRenderer wer = new WysiwygEditingRenderer(ctx, d);
    return wer.getString();
}
Also used : WikiContext(org.apache.wiki.WikiContext) JSPWikiMarkupParser(org.apache.wiki.parser.JSPWikiMarkupParser) WikiPage(org.apache.wiki.WikiPage) StringReader(java.io.StringReader) WikiDocument(org.apache.wiki.parser.WikiDocument)

Example 3 with JSPWikiMarkupParser

use of org.apache.wiki.parser.JSPWikiMarkupParser in project jspwiki by apache.

the class CounterPluginTest method translate.

private String translate(String src) throws IOException, NoRequiredPropertyException, ServletException {
    WikiContext context = new WikiContext(testEngine, new WikiPage(testEngine, "TestPage"));
    MarkupParser p = new JSPWikiMarkupParser(context, new StringReader(src));
    WikiDocument dom = p.parse();
    WikiRenderer r = new XHTMLRenderer(context, dom);
    return r.getString();
}
Also used : WikiContext(org.apache.wiki.WikiContext) JSPWikiMarkupParser(org.apache.wiki.parser.JSPWikiMarkupParser) WikiPage(org.apache.wiki.WikiPage) StringReader(java.io.StringReader) WikiRenderer(org.apache.wiki.render.WikiRenderer) XHTMLRenderer(org.apache.wiki.render.XHTMLRenderer) WikiDocument(org.apache.wiki.parser.WikiDocument) MarkupParser(org.apache.wiki.parser.MarkupParser) JSPWikiMarkupParser(org.apache.wiki.parser.JSPWikiMarkupParser)

Aggregations

StringReader (java.io.StringReader)3 WikiContext (org.apache.wiki.WikiContext)3 WikiPage (org.apache.wiki.WikiPage)3 JSPWikiMarkupParser (org.apache.wiki.parser.JSPWikiMarkupParser)3 WikiDocument (org.apache.wiki.parser.WikiDocument)3 MarkupParser (org.apache.wiki.parser.MarkupParser)1 WikiRenderer (org.apache.wiki.render.WikiRenderer)1 XHTMLRenderer (org.apache.wiki.render.XHTMLRenderer)1