Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-24062

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 18.1.0
    • Blocknote
    • 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

          Activity

            People

              Unassigned Unassigned
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: