wikimacrocontent

Last modified by Lucas Charpentier on 2026/10/27 10:30

Audit

Macro ID
wikimacrocontent
Source
XS
Type
Generator
Classification reason
The macro has no parameter and no content, and what it displays is not typed in the macro: it stands for the content that the caller passes to the wiki macro whose code holds it, and on a normal page its output is invisible. It is classified as a generator, like id and putFootnotes. It is not a wrapper, since the editable content belongs to the wiki macro call, not to the macro itself.
Status
Reviewed
Criteria version
15.20
XWiki version
18.8.0
Audit date
2026-10-20
Auditor
Compared macros
attachmentGalleryPicker putFootnotes

Sources

Where to gather the information the criteria are checked against, see Gather the sources.

SourceWhat it givesUsed forWhere
DocumentationParameters, default values and examples, including the most common exampleL2, L3, and the criteria measured with the most common examplehttps://www.xwiki.org/xwiki/bin/view/documentation/xs/dev/rendering-macros/wiki-macros/write-wiki-macro/
Source codeHow the macro declares its parameters and content: types, groups, features, advanced and hidden flags, constraints, content type, inline supportC4, C5, C7, C8, C9, C13, E4, E6https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-18.8.0/xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-wikimacro/xwiki-platform-rendering-wikimacro-store/src/main/java/org/xwiki/rendering/wikimacro/internal/WikiMacroContentMacro.java
Macro descriptorWhat the Edit Macro dialog is built from, on design.xwiki.orgD1, D2, C1 to C9, E4Descriptor, list of macros with their categories
TranslationsThe name, description and parameter names in each languageD1, D2, D4, C1l10n.xwiki.org
Uses in XWiki pagesHow XWiki itself uses the macro, a realistic example when the documentation has noneL3, C2, C3, C6, C8, C9Search the xwiki organization on GitHub
Compared macrosThe audits of the macros of the same typeL1, D3attachmentGalleryPicker, putFootnotes
Other sources specific to this macro
  • WikiMacroContentMacro.java: the macro extends AbstractNoParameterMacro, declares inline support and returns an empty group, or an empty span in an inline context, carrying data-wikimacro-id="wikimacrocontent", which the wiki macro replaces with the content of the call after its execution.
CriterionResultNotes
D1 wordingKOminor: "WikiMacro Content" is the macro ID spelled with capitals, and "WikiMacro" is the camel-case form of "wiki macro", the words the documentation and the editor use for this feature. A developer reads it, so technical words are fine, but the measure asks for no camelCase and "Put Footnotes" is the same kind of ID split into words. The French and German names are the English one.
D2 summaryKOminor: "Display editable content of a wikimacro." repeats the name and adds only "editable", and it spells "wikimacro" as one word. It does not say where the macro works. It does something only in the code of a wiki macro, where it shows the content the caller passes, and only when that content is of type Wiki, and on a normal page it renders nothing at all. The documentation says both, see L2.
D3 categoryKODevelopment, but the macro only works in the code of a wiki macro, a code editor with no Quick Actions and no Insert Macro dialog, and renders nothing on a normal page, so it should be in the Internal category. Only the Internal and Deprecated categories are hidden from the Quick Actions menu and the Insert Macro dialog, for the users who do not display hidden pages; Development keeps it listed for every user. XWIKI-21063 names this macro. Once it is Internal, the criteria no longer require auditing it.
D4 quick-actionOKwith the fixtures of the audit left out of the results, Quick Actions finds the macro first for "WikiMacro Content", "wikimacrocontent", "wiki macro content" and the synonym "macro content". The synonyms "editable content" and "content placeholder" give no result. The French and German names are the English one, so no other language finds it by a different name, which is recorded as OK like the other macros named after the feature they belong to, here wiki macros, and the missing translations of the name and the description are a matter for l10n.xwiki.org. The Insert Macro dialog does not search IDs, which is generic.
L1 consistencyOKcompared with attachmentGalleryPicker and putFootnotes: like them it has no parameter, no content and no mandatory value, and the Quick Action inserts the macro right away with no dialog.
L2 doc-parametersOKthe audited documentation is the new page Write a Macro in a Wiki Page, not the legacy tutorial that check_docs.py read. The macro has no parameter and no content, so there is nothing to list. The page says what the macro does, "Display the content the caller passes, by adding the wikimacrocontent macro to Macro code", and the page Wiki Macros adds that it works only where the content is of type Wiki and that a macro used inside a sentence cannot be edited in place, CKEDITOR-248, which the tests of E3 confirm.
L3 doc-exampleOKthe most common use is the one inside the code of a wiki macro, which the Write a Macro in a Wiki Page documents: {{velocity}}Hello World!{{/velocity}} followed by {{wikimacrocontent/}} as Macro code. Pasted into the code of a wiki macro, it renders the greeting then the content of the call, "Hello World!" then "Some text" for a call with that content, and with no content it renders the greeting only. The check_docs.py tool read the legacy tutorial, which moved, so its KO is not the state of the documentation.
I1 patternOKcompared with children, the reference generator: a developer writes {{wikimacrocontent/}} in the code field of the wiki macro, a plain code editor with no Quick Actions and no Insert Macro dialog, so there is no insertion behavior of its own. In the WYSIWYG editor the Quick Action inserts it with no dialog, like children, and the Insert Macro dialog says "This macro has no parameters."
I2 zero-configOKthe most common use is inside a wiki macro, where the default call gives the content of the caller, in a box for the fixture MacroAudit.WikiMacroContentFixture, with no error. Inserted on a normal page, the macro shows nothing in view mode and the generic placeholder "macro:wikimacrocontent" in the editor, but that is not the use it is made for.
I3 instantN/A
I4 cursorN/A
I5 focusOK
E1 wysiwygOKin the editor, a page calling the fixture shows the same box and the same text as in view mode, and the text is edited in place, with a typed character kept in the saved content. The call of the macro itself is never shown in the editor in that use, since it lives in the code of the wiki macro. On a normal page the editor shows the generic placeholder "macro:wikimacrocontent" and the view mode shows nothing, which is not the use the macro is meant for.
E2 errorsN/A
E3 nestingKOminor: in the content of a wiki macro, a paragraph, a list, a table and a box macro are all edited in place and saved, tested with the fixture. The wiki macro called inside a box is edited in place too. Called inside a list item or a table cell, a wiki macro renders its content in view mode with no error, but the editor does not allow editing the content in place there, unlike at the top level or in a box, and gives no message about it, see CKEDITOR-248 in the documentation. The block-only error "is a standalone macro and it cannot be used inline" comes from the supportsInlineMode field of the wiki macro, not from wikimacrocontent, which declares inline support. In the previous probe the box result was "True, False" between runs, because the probe was testing the content area of the box that held the bare macro, which has no content of its own: the screenshot nesting-2.png shows the generic placeholder inside the editable area of the box.
E4 inline-supportOKinline support is declared and works: a wiki macro with inline support, called in a sentence, renders the content in the sentence with no block element, and the macro used alone inline renders an empty span. The content of such a call cannot be edited in place, which is counted in E3.
E5 emptyN/Anot applicable, the macro has no content area. A related gap is not counted: a call of a wiki macro with an empty content shows the box of the wiki macro, but there is no area to type in, and the content has to be set in the Edit Macro dialog, so the user who just inserted a wiki macro cannot type in it. This belongs to the wiki macro in the editor and goes to the bug list.
E6 inplaceN/Anot applicable, the macro has no content to edit. The in-place editing that it enables for the content of the wiki macro is described under E1 and E3.

KOs and tickets

Every KO needs a ticket covering it, see Report the KOs. One ticket can cover several KOs. Known issues filed for this macro are suggested in italics: link them as existing tickets when they cover the KO.

KOCriterionExisting ticketsNew tickets
D1D1 wordingXWIKI-25489
D2D2 summaryXWIKI-25489
D3D3 categoryXWIKI-21063
E3E3 nestingCKEDITOR-248, XWIKI-17417, XWIKI-19954, XWIKI-23309 (partial)
Success

Every KO is covered by a ticket.

Tickets

TicketOriginKOs coveredKOs partly covered
CKEDITOR-248ExistingE3
XWIKI-17417ExistingE3
XWIKI-19954ExistingE3
XWIKI-23309ExistingE3
XWIKI-21063ExistingD3
XWIKI-25489NewD1 D2

Known issues of this macro

IssueTitleStatusCriteria
XWIKI-24905Empty {{wikimacrocontent/}} fails to render/editOpenE5

68 more known issues affect every macro: see the Known issues.

Get Connected