Last modified by Simon Urli on 2023/10/10

From version 8.1
edited by Asiri Rathnayake
on 2009/07/20
Change comment: There is no comment for this version
To version 5.1
edited by Asiri Rathnayake
on 2009/07/20
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,8 +6,3 @@
1 -#startfloatingbox()
2 -*Contents*
3 -#toc ("2" "3" "")
4 -#endfloatingbox()
5 -
6 6  1 Wiki Macro Tutorial
7 7  
8 8  Wiki macros allow macro authors to develop reusable and distributable macro modules. There is no java code involved; hence no compiling or packaging. Macro author simply needs to create a wiki page according to a particular specification and that's all!
... ... @@ -15,16 +15,8 @@
15 15  
16 16  1.1 Hello World Macro
17 17  
18 -We are going to start with a very simple xwiki/2.0 wiki macro which prints a greeting message to the document content. It isn't a very useful macro but the idea is to get you familiarised with the wiki macro creation process.
13 +We are going to start with a very simple wiki macro which prints the text "Hello World!" to the document content. It's not a very useful macro but the idea is to get you familiarised with the wiki macro creation process.
19 19  
20 20  1.1.1 The XWiki.WikiMacroClass
21 21  
22 -Wiki macros are defined using objects of type XWiki.WikiMacroClass. You define a wiki macro by creating a new wiki page and attaching it an object of type XWiki.WikiMacroClass. This class contains following fields:
23 23  
24 -* Macro name: Name of the macro, which will be used by users to invoke your macro
25 -
26 -* Macro description: A short description of the macro, this description will be made available on the WYSIWYG editor (More on this later)
27 -
28 -* Macro content: The actual wiki content that will be evaluated when the macro is executed, can be any wiki content (should be in the same syntax as the document)
29 -
30 -

Get Connected