Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>JSXGraph Support In Markdown PreviewNew to Visual Studio Code? Get it now.
JSXGraph Support In Markdown Preview

JSXGraph Support In Markdown Preview

QingGo

| (0) | Free
Render JSXGraph inside VSCode Markdown Preview
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Markdown Preview JSXGraph Support

Render interactive JSXGraph mathematical visualizations directly inside your VSCode Markdown Preview.

Example Visualization

Features

  • Native Integration: Seamlessly renders jsxgraph fenced code blocks in Markdown.
  • Interactive: Full support for mouse dragging, wheel zooming, and touch interactions.
  • Responsive: Auto-scales to the width of your preview window.
  • Smart Auto-Fit: Automatically adjusts the viewport to show all elements with perfect padding.
  • Smooth Zoom: Optimized scroll sensitivity for a premium exploration experience.
  • Offline Capable: Bundles JSXGraph core locally; no external CDN required.

Usage

Create a fenced code block with the language jsxgraph. Within the block, use the provided containerId to initialize your board.

When calling JXG.JSXGraph.initBoard please use inner containerId variable.

var board = JXG.JSXGraph.initBoard(containerId, {
    boundingbox: [-5, 5, 5, -5],
    axis: true,
    showCopyright: false
});

var p1 = board.create('point', [-2, 2], { name: 'A', size: 4 });
var p2 = board.create('point', [3, -1], { name: 'B', size: 4 });
var line = board.create('line', [p1, p2], { strokeColor: 'blue' });

Configuration Defaults

By default, the following settings are injected to ensure a great interactive experience out of the box:

  • pan: { enabled: true, needShift: false }
  • zoom: { enabled: true, wheel: true, factor: 1.05 }
  • board.zoomFit() is automatically called after initialization to center your content.

License

This extension is licensed under the MIT License. JSXGraph itself is dual-licensed under LGPL-3.0-or-later OR MIT.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft