Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
18.1.0
-
None
-
Unknown
-
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.
Attachments
Issue Links
- is related to
-
XWIKI-23349 Execute macro transformations and protect their output when editing with BlockNote
-
- Closed
-