Skip to content

demo tour - jsxgraph is not rendered #68

Closed

Description

@cerrsys

05b - Math Diagrams
For all JSXGraph examples I get errors on the preview pane (Mac Version on Sequoia 15.7.5):

JSXGraph error:
JSXGraph: HTML container element 'zen-jxg-o7d2fumd' not found.

JSXGraph error:
JSXGraph: HTML container element 'zen-jxg-1t7o88p4' not found.

JSXGraph error:
JSXGraph: HTML container element 'zen-jxg-vfgusqhk' not found.

Activity

  1. adibhanna commented on Jun 10, 2026

    @adibhanna
    Contributor

    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 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). 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions