This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-33bac638-a7f1-44c5-86f1-0349a086add8 XWIKI-24062 Open

Macros without (visible) output are not visible in the BlockNote editor

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-d9dee3fc-0db2-4668-9eac-d604e6ebf2b1 Marius Dumitru Florea created this issue on 24/Feb/26 18:32
 
Summary: Macros without (visible) output are not visible in the BlockNote editor
Issue Type: cid:jira-generated-image-avatar-33bac638-a7f1-44c5-86f1-0349a086add8 Bug
Affects Versions: 18.1.0
Assignee: Unassigned
Components: Blocknote
Created: 24/Feb/26 18:32
Priority: cid:jira-generated-image-static-major-d27205e7-f7ee-4669-822f-bda1bae76efb Major
Reporter: Marius Dumitru Florea
Description:

We can have macro calls that:

  • don't produce any output
  • produce output that is not visible (e.g. an empty DIV or SPAN)
  • produce output that is not visible initially (e.g. a live table or a tree whose data is fetched asynchronously after the content is loaded by the editor)

In all these cases we need to display a placeholder (e.g. "macro:foo") until the macro output becomes visible (if it ever becomes).

The question is whether this is the responsibility of the client-side macro implementation or of the client-side macro framework. I think it should be the latter. A client-side macro implementation should be able for instance to return an empty array as the result of its rendering (i.e. its output) and the framework should make sure that this macro call is visible and editable inside the editor. In the same way the macro should be able to return a raw HTML block with an empty DIV or SPAN. For async macros we need to allow the macro to notify the framework when its output has been updated. On the XWiki side we have been using a custom XWiki event, xwiki:dom:updated, that the macro is firing after its output is updated. We need something similar for BlockNote / Cristal.