Thx for the help.
So far i found a solution, that is working but still has some minor issues.
I switched from groovy to velocity and changed:
(% data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" data-xwiki-parameter-name="CommandBlockText" data-xwiki-wikimacrocontent="true" class="xwiki-metadata-container cke_widget_editable" data-cke-widget-editable="CommandBlockText" data-cke-enter-mode="1" data-cke-display-name="CommandBlockText" contenteditable="true" %)
to
(% data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" data-xwiki-parameter-name="CommandBlockText" data-xwiki-wikimacrocontent="true" class="xwiki-metadata-container cke_widget_editable" data-cke-widget-editable="CommandBlockText" data-cke-enter-mode="2" data-cke-filter="84" data-cke-display-name="CommandBlockText" contenteditable="true" %)
< to < ...
All parameter types now have the default type (macro still works if i change them to java.util.List)
Issues:
Editing a parameter in the WYSIWYG editor
- Adding a info box via the macro selection in the WYSIWYG editor needs some tweaking but is mostly working. Sometimes the user needs to add extra line (especially in tables) after the info box
- Adding a info box via the style selection in the WYSIWYG editor is broken and will result in:
2.1 rendering only the content of the info box not the box itself
2.2 removing the box with its content
Here my macro code:
{{velocity}}
#set ($contents = $xcontext.macro.content )
#set ($codelanguage = $xcontext.macro.params.codeLanguage )
#set ($tabellenLink = $xcontext.macro.params.TabellenLink )
#set ($text = $xcontext.macro.params.CommandBlockText )
#set ($commandtable = '
(% class="configtable" %)
|=Property Name|=Beschreibung|=Werte|=Version
||||')
#if($tabellenLink == "Kommandotabelle")
#set ($tabellenLink = $commandtable)
#end
#if (($xcontext.action == 'get') || ($xcontext.action == 'edit'))
#set ($editresult = '
(% data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" data-xwiki-parameter-name="CommandBlockText" data-xwiki-wikimacrocontent="true" class="xwiki-metadata-container cke_widget_editable" data-cke-widget-editable="CommandBlockText" data-cke-enter-mode="2" data-cke-filter="84" data-cke-display-name="CommandBlockText" contenteditable="true" %)((('+ $text +')))
(% data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" data-xwiki-parameter-name="TabellenLink" data-xwiki-wikimacrocontent="true" class="xwiki-metadata-container cke_widget_editable" data-cke-widget-editable="TabellenLink" data-cke-enter-mode="2" data-cke-filter="84" data-cke-display-name="TabellenLink" contenteditable="true" %)((('+ $tabellenLink +')))
{{code language="'+ $codelanguage+ '" }}
'+ $contents +'
{{/code}}')
#set($wikimacro.result = $services.rendering.parse($editresult, $xwiki.getCurrentContentSyntaxId()).getChildren())
#end
#if (($xcontext.action == 'view') || ($xcontext.action == 'preview'))
#set ($viewresult = '{{box cssClass="mycontentbox"}}'+
'(% data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" data-xwiki-parameter-name="CommandBlockText" data-xwiki-wikimacrocontent="true" class="xwiki-metadata-container cke_widget_editable" data-cke-widget-editable="CommandBlockText" data-cke-enter-mode="2" data-cke-filter="84" data-cke-display-name="CommandBlockText" contenteditable="true" %)((('+ $text +')))'+'
{{showhide showmessage="⚪ Tabelle der Kommandoeigenschaften anzeigen" hidemessage="⚫ Tabelle der Kommandoeigenschaften verbergen" effect="blind" effectduration="0.1" visible="true"}}'+
'(% data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" data-xwiki-parameter-name="TabellenLink" data-xwiki-wikimacrocontent="true" class="xwiki-metadata-container cke_widget_editable" data-cke-widget-editable="TabellenLink" data-cke-enter-mode="2" data-cke-filter="84" data-cke-display-name="TabellenLink" contenteditable="true" %)((('+ $tabellenLink +')))'+'
{{/showhide}}
{{showhide showmessage="⚪ Kommandodatei anzeigen" hidemessage="⚫ Kommandodatei verbergen" effect="blind" effectduration="0.1" visible="true"}}
{{code language="'+$codelanguage+'" }}'+
$contents+'
{{/code}}
{{/showhide}}
{{/box}}')
#set($wikimacro.result = $services.rendering.parse($viewresult, $xwiki.getCurrentContentSyntaxId()).getChildren())
#end
#if ($xcontext.action == 'export' && $request.format == 'pdf')
#set ($pdfresult = '{{box cssClass="mycontentbox"}}'
+ $text +''+
$tabellenLink +'
{{code language="'+$codelanguage+'" }}'+
$contents+'
{{/code}}
{{/box}}')
#set($wikimacro.result = $services.rendering.parse($pdfresult, $xwiki.getCurrentContentSyntaxId()).getChildren())
#end
{{/velocity}}