Changes for page Writing XWiki Rendering Macros in wiki pages
Last modified by Vincent Massol on 2023/04/06
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -41,7 +41,7 @@ 41 41 * **Default category**: Default category under which this macro should be listed 42 42 * **Supports inline mode**: Whether the macro can be used in an inline context or not 43 43 * **Macro Content availability**: {{warning}}before 11.5RC1 this was called **Macro Content Type**{{/warning}} whether this macro should support a body or not 44 -* **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}}java.util.List<java.lang.String>{{/code}}. Leaving the field blank is equivalent to ###UNKWOWN###value.44 +* **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}}java.util.List<java.lang.String>{{/code}}. Leaving the field blank is equivalent to ##UNKWOWN## value. 45 45 * **Content description**: A short description about the macro's content to be displayed on the WYSIWYG editor 46 46 * **Macro code**: The actual wiki code that will be evaluated when the macro is executed, can be any xwiki content (should be in the same syntax as the document) 47 47 * **Asynchronous rendering**: {{info}}Since 10.10{{/info}} Enabled or disable asynchronous rendering of the panel. Disabled by default. ... ... @@ -178,6 +178,15 @@ 178 178 {{/velocity}} 179 179 {{/code}} 180 180 181 +== WYSIWYG editing of macro content or parameter == 182 + 183 +As specified above you can use the dedicated macros {{code language="none"}}{{wikimacrocontent/}}{{/code}} and {{code language="none"}}{{wikimacroparameter name="foo"/}}{{/code}} to allow the users of your macro to be able to edit the values of the macro directly in the WYSIWYG editor once the macro is inserted. 184 +Note that this is currently only possible if you specified that the macro content (or parameter) type is ##WIKI## type. 185 + 186 +{{info}} 187 +There is also a known limitation related to CKEditor that prevents editing directly those macros if they are not used as "standalone" macro. Details can be found on the related issue: https://jira.xwiki.org/browse/CKEDITOR-248. 188 +{{/info}} 189 + 181 181 = Scripting Tips = 182 182 183 183 Following are a few useful hints if you plan to do advanced scripting inside your wiki macros: