-----Original Message-----
From: Marc Lijour [mailto:marc@lijour.net]
Sent: jeudi 28 décembre 2006 16:36
To: xwiki-dev(a)objectweb.org
Subject: Re: implement a radeox custom filter (was Re: Creole support
(was RE: [xwiki-dev] XWiki 309 : Bold codification is not the same than
in wiki editor mode))
Thank you.
I added your explanation in the FAQ:
http://www.xwiki.org/xwiki/bin/view/FAQ/HowToImplementACustomRadeoxFilt
erOrMacro
I believe it should also have a place somewhere in the
Dev guide. But I
am not in the best place to tell where.
I'll do a reorganization of the dev guide space a bit later. I copied the
one from the old site but it needs some reorganization but whatever you put
there I'll keep of course so feel free to document it there :-)
Thanks
-Vincent
On Thursday 28 December 2006 07:14, Sergiu Dumitriu
wrote:
Yes, xwiki already uses some custom filters and
macros, located in
the
com.xpn.xwiki.render.[filter/macro] packages.
How to implement a custom filter/macro:
1. Write a new class in the com.xpn.xwiki.render.[filter/macro]
package.
You can look at the existing classes for an
example. Some are simple,
like StrongFilter, which rely on the match/print configuration (see
item 2). You must define a key for the filter/macro.
2. Add the "match" and "print" regular expressions in the
core/src/main/resources/radeox_markup_xwiki.properties file.
3. Register the new class in
core/src/main/resources/META-INF/services/*
file. Just add the full classname in the corresponding file.
For more details about how a radeox filter/macro works, I think the
radeox documentation is the enough.
I'm not sure about the admin panel for changing the syntax. It can be
done, but I don't know if it is such an useful feature. The more
complex macros/filters definitely need changes in the java code in
order to be customized, and we can't do this from the web interface.
Hope this answers you previous mail, too.
Sergiu
On 12/28/06, Marc Lijour <marc(a)lijour.net> wrote:
> On Wednesday 27 December 2006 12:33, Vincent Massol wrote:
> > * (optional) The rendering would no longer accept the old
> > syntaxes. If
>
> we
>
> > want to be extra nice we would continue supporting the old
> > syntaxes for some time. Only problem is that this is costing a
lot
> > > in term of development efforts and potential bugs. We would have
> > > to take a call on this.
> >
> > Would it be possible for the user to add custom filters for radeox
> > (see my previous post for the references)?
> >
> > Is that case it would be acceptable to adopt a restrictive policy,
> > as the user can set up his preferred behaviour back.
___________________________________________________________________________
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface
révolutionnaire.