Changes for page Writing XWiki Rendering Macros in wiki pages
Last modified by Simon Urli on 2023/10/10
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -23,7 +23,7 @@ 23 23 * **Macro id**: Id of the macro to be used by users when invoking your macro from wiki code 24 24 * **Macro name**: Name of the macro to be displayed on the wysiwyg editor 25 25 * **Macro description**: A short description of the macro to be displayed on the WYSIWYG editor 26 -* **Default categor y**: Default categoryunder which this macro should be listed26 +* **Default categories**: Default categories under which this macro should be listed {{warning}}before 14.4RC1 this was called **Default category**{{/warning}} 27 27 * **Supports inline mode**: Whether the macro can be used in an inline context or not 28 28 * **Macro Content availability**: {{warning}}before 11.5RC1 this was called **Macro Content Type**{{/warning}} whether this macro should support a body or not 29 29 * **Macro content type**: {{warning}}this field has been renamed **Macro Content Availability** since 11.5RC1{{/warning}} the type of accepted content: two values are proposed, ##WIKI## if this content should be editable like a wiki content, or ##UNKNOWN## if it should be displayed like a plain text. It's also possible to specify a custom java type such as {{code language="java"}}java.util.List<java.lang.String>{{/code}}. Leaving the field blank is equivalent to ##UNKWOWN## value. ... ... @@ -36,11 +36,11 @@ 36 36 37 37 Now we can define our hello macro as shown below: 38 38 39 -{{image reference="macro1.png"/}} 39 +{{image reference="macro1.png" width="650px"/}} 40 40 41 41 == Invocation == 42 42 43 -A wiki macro can be invoked just like any other macro is invoked. Since we are writing a xwiki/2. 0wiki macro, we can invoke our **hello macro** as below:43 +A wiki macro can be invoked just like any other macro is invoked. Since we are writing a xwiki/2.1 wiki macro, we can invoke our **hello macro** as below: 44 44 45 45 {{code language="none"}} 46 46 {{hello/}} ... ... @@ -148,15 +148,15 @@ 148 148 149 149 = Bindings = 150 150 151 -See all availa lbe bindings in [[the reference documentation page>>doc:extensions:Extension.WikiMacroStore.WebHome||anchor="HBindings"]].151 +See all available bindings in [[the reference documentation page>>doc:extensions:Extension.WikiMacroStore.WebHome||anchor="HBindings"]]. 152 152 153 153 = WYSIWYG Access = 154 154 155 155 A wiki macros is treated just like any other rendering macro in the system. As such, the moment you save your wiki macro it will be available to the users through the WYSIWYG editor's **Insert Macro** dialog box: 156 156 157 -[[image:macro2.png]] 157 +[[image:macro2.png||height="293" width="350"]] 158 158 159 -[[image:macro4.png]] 159 +[[image:macro4.png||height="149" width="350"]] 160 160 161 161 == Special code for WYSIWYG edit mode == 162 162 ... ... @@ -232,7 +232,7 @@ 232 232 This pitfall has been fixed in XWiki 2.2 233 233 {{/info}} 234 234 235 -There is a common pitfall for using optional paramters. The following macro code contains a not so obvious bug: 235 +There is a common pitfall for using optional parameters. The following macro code contains a not so obvious bug: 236 236 237 237 {{code languege="velocity"}} 238 238 {{velocity}}
- macro2.png
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. surli1 +XWiki.mleduc - Size
-
... ... @@ -1,1 +1,1 @@ 1 - 15.7KB1 +24.8 KB - Content