jupyterlab_drawio_render_extension
v1.0.15
Published
Jupyterlab extension to just render the drawio diagram (viewer in Jupyterlab)
Maintainers
Readme
jupyterlab_drawio_render_extension
View Draw.io diagrams directly in JupyterLab. Open any .drawio or .dio file and see it rendered with full fidelity - text, shapes, stencils, icons, and styles matching the official Draw.io application.
This extension uses the official Draw.io viewer library from jgraph, served locally from the server extension for offline capability and CSP compliance.

Features
- Full Draw.io rendering - Uses official Draw.io viewer library for pixel-perfect diagram display
- Read-only viewer - Safe viewing without accidental modifications
- Interactive controls - Zoom, pan, layers panel, and lightbox view
- PNG export - Right-click to copy or download diagram as PNG with configurable DPI
- Configurable background - Choose from default (theme), black, white, or custom hex color
- Full stencil support - Veeam, Cisco, AWS, Azure, GCP, and all vendor shapes
- Offline capable - Viewer library served locally, no external network requests
- JupyterLab 4 compatible - Built for the latest JupyterLab release
PNG Export
Right-click on any diagram to access export options:
- Copy Diagram as PNG - Copy to clipboard at configured DPI
- Download Diagram as PNG - Save as PNG file
Export automatically crops to diagram content with minimal padding.
Settings
Configure the extension in Settings > Draw.io Viewer:
Viewer Settings
| Setting | Description | Default |
| ----------------------- | -------------------------------------------------------------- | --------- |
| Background | Viewer background: default (theme), black, white, custom | default |
| Custom Background Color | Hex color (e.g., #f0f0f0) when background is custom | #ffffff |
Export Settings
| Setting | Description | Default |
| ----------------- | ---------------------------------------------------------------- | ------- |
| Export DPI | Resolution for PNG export (72-1200). Higher = larger file | 300 |
| Export Background | PNG background: transparent, white, black, custom | white |
Requirements
- JupyterLab >= 4.0.0
- Python >= 3.10
Installation
pip install jupyterlab-drawio-render-extensionUninstall
pip uninstall jupyterlab-drawio-render-extension