Ulf,

In case you want to use your own special markup, you might want to consider
the use of a post-Translate filter.

Put your markup inside a {{{ [here is my special markup]... }}} so it is
not touched by JSPWiki.

Your post-Translate filter will be called after the page was converted to
HTML.
It can replace the special markup sections, which are left untouched inside
<pre>  [here is my special markup]... </pre> blocks, by the styled HTML.

dirk

On Tue, Apr 2, 2019 at 9:31 PM Juan Pablo Santos Rodríguez <
juanpablo.san...@gmail.com> wrote:

> Hi Ulf,
>
> the body of a plugin can be reached through the special parameter _body
> [#1] (there should be a blank line between plugin parameters and the plugin
> body
> itself); f.ex., the IfPlugin [#2],[#3] parses the plugin's body if some
> condition is met.
>
> Also, keep in mind that for a "RawPlugin" you should consider sanitizing
> the plugin body so you don't end up with nasty javascript on your pages.
>
>
> HTH,
> juan pablo
>
> [#1]: https://jspwiki-wiki.apache.org/Wiki.jsp?page=WikiPlugin
> [#2]: https://jspwiki-wiki.apache.org/Wiki.jsp?page=IfPlugin
> [#3]:
>
> https://github.com/apache/jspwiki/blob/master/jspwiki-main/src/main/java/org/apache/wiki/plugin/IfPlugin.java#L140
>
> On Tue, Apr 2, 2019 at 4:56 PM Ulf Dittmer
> <ulf.ditt...@googlemail.com.invalid> wrote:
>
> > No, I hadn't been aware of that. That does pretty much what I want to
> > accomplish. And I see there's CSS to alter the colors.
> >
> > Thanks a lot!
> >
> > Out of curiosity: is there any way to achieve what I originally asked? I
> > see myself wanting to have this in JSPWiki in some way sooner or later.
> >
> > Ulf
> >
> > On Tue, Apr 2, 2019 at 1:06 PM Dirk Frederickx <
> dirk.frederi...@gmail.com>
> > wrote:
> >
> > > Ulf
> > >
> > > Did you try %%prettify style?
> > > https://jspwiki-wiki.apache.org/Wiki.jsp?page=Prettify
> > >
> > > dirk
> > >
> >
>

Reply via email to