You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cause: the preview renders a note into a detached buffer and only swaps it into the page afterward. JSXGraph's initBoard() looks up its container with document.getElementById against the live document (and sizes the board from the laid-out element), so on the detached buffer it couldn't find zen-jxg-… and failed. Mermaid and function-plot use different mechanisms, which is why only JSXGraph broke.
Fix: the preview now attaches the rendered note to the live DOM before running the diagram renderers, so JSXGraph boards mount correctly. Verified against the demo tour's 05b — Math Diagrams note (the three JSXGraph figures render and are draggable). The PDF export uses the same preview, so it's covered too.
Fixed in #88 — it'll ship in the next release (v2.2.0). 🙏
Activity
adibhanna commentedon Jun 10, 2026
Thanks for the report — reproduced and fixed.
Cause: the preview renders a note into a detached buffer and only swaps it into the page afterward. JSXGraph's
initBoard()looks up its container withdocument.getElementByIdagainst the live document (and sizes the board from the laid-out element), so on the detached buffer it couldn't findzen-jxg-…and failed. Mermaid and function-plot use different mechanisms, which is why only JSXGraph broke.Fix: the preview now attaches the rendered note to the live DOM before running the diagram renderers, so JSXGraph boards mount correctly. Verified against the demo tour's 05b — Math Diagrams note (the three JSXGraph figures render and are draggable). The PDF export uses the same preview, so it's covered too.
Fixed in #88 — it'll ship in the next release (v2.2.0). 🙏
fix(preview): render diagrams after attaching to the live DOM (#68) (#88