content
Audit
- Macro ID
- content
- Source
- XS
- Type
- Wrapper
- Classification reason
- Its output is the content the user types, parsed in the syntax given by the syntax parameter. With the advanced source parameter the content comes from a script variable instead, a rarer use.
- Status
- Reviewed
- Criteria version
- 15.20
- XWiki version
- 18.8.0
- Audit date
- 2026-10-14
- Auditor
- Compared macros
- html code
Sources
Where to gather the information the criteria are checked against, see Gather the sources.
| Other sources specific to this macro |
|---|
|
| Criterion | Result | Notes |
|---|---|---|
| D1 wording | OK | the measure is met, no technical word, but "Content" says little about what the macro produces, content written in another syntax, and is also the label of the content field of every macro. |
| D2 summary | OK | |
| D3 category | OK | in Content, like include and display. The compared macros, html and code, are in Development and Formatting, so the measure gives no single expected category: Content fits a macro that inserts content. |
| D4 quick-action | KO | Quick Actions finds the macro first for "content", "Content", the synonym "markup" and the German name "Inhalt". The synonyms "markdown" and "syntax" give no result, for example "/markdown" in a page, although writing Markdown in an XWiki 2.1 page is a main use of the macro. The French name "Contenu" comes first in the Quick Actions results too, but the probe did not find the entry inserting the macro in French. |
| L1 consistency | OK | compared with html and code. Their Quick Actions open the Edit Macro dialog and the content is typed in a text area, while content is inserted at once with a rich text content edited in place; html requires its content, while content and code have an optional content, since the source parameter can give it instead. The differences are by design: the content of html and code is code, the content of this macro is rendered. |
| L2 doc-parameters | KO | the parameters are documented only on the legacy extensions.xwiki.org page, with no page in the new documentation. That page also gives syntax as not optional, while the macro uses the current syntax when it is empty, since XWiki 15.1, and does not document the content. |
| L3 doc-example | KO | the example of the documentation, {{content syntax="confluence/1.0"}}This is *bold* too!{{/content}} , renders the error "Can't find descriptor for the component with type [interface org.xwiki.rendering.parser.Parser] and hint [confluence/1.0]" on XWiki Standard, which has no Confluence parser; the usage example holds a <syntax id> placeholder. The audit uses the same example with a syntax of XWiki Standard: {{content syntax="html/5.0"}}<p>This is <strong>bold</strong> too!</p>{{/content}} . |
| I1 pattern | OK | |
| I2 zero-config | KO | minor: the macro inserted from Quick Actions, or by the Edit Macro dialog submitted with the default values, is {{content}} {{/content}} : an empty content in the syntax of the page, which renders nothing in view mode and only an empty line in the editor, with no placeholder saying what it is. |
| I3 instant | OK | |
| I4 cursor | OK | |
| I5 focus | N/A | |
| E1 wysiwyg | OK | |
| E2 errors | KO | an unavailable syntax gives a technical message that names neither the parameter nor how to fix it: {{content syntax="markdown/1.2"}}x{{/content}} renders "Failed to execute the [content] macro. Cause: [Can't find descriptor for the component with type [interface org.xwiki.rendering.parser.Parser] and hint [markdown/1.2]]". The source parameter gives understandable messages, like "Unsupported source type [foo]" for {{content source="foo:bar"/}} , and a malformed syntax gives "Invalid Syntax format [abc]". |
| E3 nesting | KO | the example renders in a list item, a table cell and a box, and a list, a table and a box render and can be edited inside its content. But in a list item and in a table cell, like * {{content syntax="html/5.0"}}<p>This is <strong>bold</strong> too!</p>{{/content}} , the macro is inline and its content cannot be edited in place. |
| E4 inline-support | OK | the macro declares inline support and renders inside a sentence, with no block element, as in Before {{content syntax="html/5.0"}}<p>This is <strong>bold</strong> too!</p>{{/content}} after. . |
| E5 empty | OK | |
| E6 inplace | KO | the content is edited in place as rich text, and saved back in the syntax of the macro. But the Edit Macro dialog of an existing macro still shows the content in a text area, converted to the syntax of the page instead of the syntax of the macro, and submitting it unchanged breaks the content: for {{content syntax="html/5.0"}}<p>This is <strong>bold</strong> too!</p>{{/content}} , the dialog shows "This is bold too!", and after Submit the page is saved as {{content syntax="html/5.0"}}<p>This is **bold** too!</p>{{/content}} , which displays the asterisks instead of bold text. This needs two distinct tickets: the generic text area of the dialog, and this conversion bug of the content macro, which loses data. |
Parameters
| Parameter | C1 clarity | C2 mandatory | C3 defaults | C4 input-assistance | C5 groups | C6 order | C7 alternatives | C8 advanced | C9 technical | C13 constraints | Notes |
|---|---|---|---|---|---|---|---|---|---|---|---|
| $content | KO | OK | N/A | OK | N/A | OK | N/A | N/A | N/A | N/A | C1, minor: the description "The content to execute" uses a wrong term: the content is parsed in the syntax given by the syntax parameter and displayed, not executed. The French translation repeats it, "Le contenu à exécuter". C4: edited in place as rich text; the text area of the Edit Macro dialog is recorded under E6. |
| source | KO | OK | OK | OK | OK | OK | OK | OK | OK | N/A | C1, minor: the description "the reference of the content to insert (e.g. string:bold, script:myvariable)" does not say that the source replaces the content of the macro. The descriptor in the source code says it, "instead of the content of the macro", but the translation dropped it. C4: a free text field, which fits: the content macro only supports the string: and script: types, {{content source="page:XWiki.XWikiSyntaxBold"/}} gives "Unsupported source type [page]", so no picker applies. C7: source and the content are alternative ways to give the content, the source replacing the content, but the Edit Macro dialog cannot present them as one choice, since only parameters can be part of a feature. A limitation of the macro system, listed in the Cross-macro findings, reported as XWIKI-25456. C9: advanced, and used by the documentation example that displays a script variable, {{content source="script:myvar"/}} . |
| syntax | OK | OK | KO | KO | OK | OK | N/A | OK | OK | OK | C3: the field opens empty, which means the syntax of the page, while the most common example sets html/5.0. Nothing in the field shows which syntax the empty value stands for. C4: a free text field for a syntax identifier, although the accepted values are the input syntaxes installed on the wiki, which a select could list. The user has to know the identifiers, and the description suggests "confluence/1.0", which XWiki Standard does not provide: {{content syntax="markdown/1.2"}}x{{/content}} is accepted by the dialog and fails at rendering, see E2. C13: the parameter is typed as a Syntax, so its format is declared; a well-formed but unavailable syntax is covered by C4. |
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.
| KO | Criterion | Existing tickets | New tickets |
|---|---|---|---|
| D4 | D4 quick-action | XWIKI-25444 | |
| L2 | L2 doc-parameters | XINFRA-525 | |
| L3 | L3 doc-example | XINFRA-526 | |
| I2 | I2 zero-config | XWIKI-25569 | |
| E2 | E2 errors | XWIKI-16048 (partial) | XCOMMONS-3847 (partial), XRENDERING-823 (partial) |
| E3 | E3 nesting | CKEDITOR-248, XWIKI-19954, XWIKI-23309 (partial) | |
| E6 | E6 inplace | XWIKI-25443 (partial), XWIKI-25584 | |
| C1:$content | C1 clarity, $content | XWIKI-25493 | |
| C1:source | C1 clarity, source | XWIKI-25493 | |
| C3:syntax | C3 defaults, syntax | XRENDERING-550 | |
| C4:syntax | C4 input-assistance, syntax | XWIKI-16048 |
Tickets
| Ticket | Origin | KOs covered | KOs partly covered |
|---|---|---|---|
| CKEDITOR-248 | Existing | E3 | |
| XRENDERING-550 | Existing | C3:syntax | |
| XWIKI-16048 | Existing | C4:syntax | E2 |
| XWIKI-19954 | Existing | E3 | |
| XWIKI-23309 | Existing | E3 | |
| XCOMMONS-3847 | New | E2 | |
| XRENDERING-823 | New | E2 | |
| XWIKI-25443 | New | E6 | |
| XWIKI-25444 | New | D4 | |
| XWIKI-25493 | New | C1:$content C1:source | |
| XINFRA-525 | New | L2 | |
| XINFRA-526 | New | L3 | |
| XWIKI-25569 | New | I2 | |
| XWIKI-25584 | New | E6 |
Known issues of this macro
| Issue | Title | Status | Criteria |
|---|---|---|---|
| XRENDERING-550 | Provide good defaults for the 'Content' macro parameters | Open | C3 |
| XWIKI-16048 | List the available syntaxes in the Content macro's parameters modal | Open | C4 |
68 more known issues affect every macro: see the Known issues.
Lucas Charpentier