Hello, I'd like to know how can I create a new tag to provide a specific text format such as {mytag} ? In fact, I'd like to propose a {system} tag that format text with Courier New font. Regards -- Xavier MOGHRABI - Consortium ObjectWeb Jabber: [email protected] - Phone: +33 4 76 61 52 35
Hi, The tags in {}'s are Radeox macros. To create a new Radeox macro: 1. You need to write some Java code. Implement a subclass of BaseLocaleMacro. The meat goes in the execute method. Get the XWiki code and look at the classes in package com.xpn.xwiki.render.macro for examples. Ensure getLocale() returns "macro.myMacro" where myMacro is your macro name. 2. Jar up your classes and put them in xwiki/WEB-INF/lib 3. Append the following to WEB-INF/classes/radeox_markup_xwiki.properties: macro.myMacro.name=myMacro 4. Append the following to WEB-INF/classes/META-INF/services/com.xpn.xwiki.render.macro.XWikiMacro : my.package.name.myMacroClassName Regards, Robin. On 17/05/06, Xavier MOGHRABI <[email protected]> wrote:
Hello,
I'd like to know how can I create a new tag to provide a specific text format such as {mytag} ?
In fact, I'd like to propose a {system} tag that format text with Courier New font.
Regards
-- Xavier MOGHRABI - Consortium ObjectWeb Jabber: [email protected] - Phone: +33 4 76 61 52 35
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
By the way, have you tried the {code} tag? It might do what you need already. On 17/05/06, Robin Fernandes <[email protected]> wrote:
Hi,
The tags in {}'s are Radeox macros. To create a new Radeox macro:
1. You need to write some Java code. Implement a subclass of BaseLocaleMacro. The meat goes in the execute method. Get the XWiki code and look at the classes in package com.xpn.xwiki.render.macro for examples. Ensure getLocale() returns "macro.myMacro" where myMacro is your macro name. 2. Jar up your classes and put them in xwiki/WEB-INF/lib 3. Append the following to WEB-INF/classes/radeox_markup_xwiki.properties: macro.myMacro.name=myMacro 4. Append the following to WEB-INF/classes/META-INF/services/com.xpn.xwiki.render.macro.XWikiMacro : my.package.name.myMacroClassName
Regards, Robin.
On 17/05/06, Xavier MOGHRABI <[email protected]> wrote:
Hello,
I'd like to know how can I create a new tag to provide a specific text format such as {mytag} ?
In fact, I'd like to propose a {system} tag that format text with Courier New font.
Regards
-- Xavier MOGHRABI - Consortium ObjectWeb Jabber: [email protected] - Phone: +33 4 76 61 52 35
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
There is also a new features called Macro Mapping in the latest SVN source code. Once we release 1.0B1 we will document it more in details. It allows to write macros in velocity and use them using {} tags. This aims at being very flexible. Ludovic Robin Fernandes a écrit :
Hi,
The tags in {}'s are Radeox macros. To create a new Radeox macro:
1. You need to write some Java code. Implement a subclass of BaseLocaleMacro. The meat goes in the execute method. Get the XWiki code and look at the classes in package com.xpn.xwiki.render.macro for examples. Ensure getLocale() returns "macro.myMacro" where myMacro is your macro name. 2. Jar up your classes and put them in xwiki/WEB-INF/lib 3. Append the following to WEB-INF/classes/radeox_markup_xwiki.properties: macro.myMacro.name=myMacro 4. Append the following to WEB-INF/classes/META-INF/services/com.xpn.xwiki.render.macro.XWikiMacro : my.package.name.myMacroClassName
Regards, Robin.
On 17/05/06, Xavier MOGHRABI <[email protected]> wrote:
Hello,
I'd like to know how can I create a new tag to provide a specific text format such as {mytag} ?
In fact, I'd like to propose a {system} tag that format text with Courier New font.
Regards
-- Xavier MOGHRABI - Consortium ObjectWeb Jabber: [email protected] - Phone: +33 4 76 61 52 35
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
------------------------------------------------------------------------
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic
participants (3)
-
Ludovic Dubost -
Robin Fernandes -
Xavier MOGHRABI