Changes for page Writing XWiki Rendering Macros in wiki pages
Last modified by Clément Desableau on 2023/06/01
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -8,3 +8,17 @@ 8 8 * Wiki macro authors need to have programming rights 9 9 * Wiki macros can only be defined inside the main wiki, though they can be used throughout a farm 10 10 11 +1.1 Hello World Macro 12 + 13 +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. 14 + 15 +1.1.1 The XWiki.WikiMacroClass 16 + 17 +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: 18 + 19 +* Macro name: Name of the macro, which will be used by users to invoke your macro. 20 + 21 +* Macro description: A short description of the macro, this description will be made available on the WYSIWYG editor (More on this later). 22 + 23 +* 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). 24 +