demo | docs | install | build |
---|---|---|---|
Drawio diagrams for JupyterLab. Forked with ❤️ from QuantStack/jupyterlab-drawio.
Install · History · Roadmap · Contribute · Open Source
This is BETA software. Native drawio files created with these tools should work with any other drawio client, but any UI/API is liable to change at any time.
mamba install -c conda-forge ipydrawio # recommended, or...
conda install -c conda-forge ipydrawio # or...
pip install ipydrawio ipydrawio
ipydrawio
- Edit multi-page documents
- with nearly the same UI and features as diagrams.net
- in many file formats
- Drawio/mxgraph XML, SVG, PNG
- or Jupyter Notebooks
- Jupyter rich display output
- Jupyter Widgets
- Edit multi-page documents
ipydrawio-export
- Export print-quality PDF from diagrams
- optionally include editable Drawio XML as a PDF attachment
-
BEWARE: some heavy, maybe fragile dependencies,
mamba
recommendedmamba install -c conda-forge ipydrawio-export # recommended, or... conda install -c conda-forge ipydrawio-export # or... pip install ipydrawio ipydrawio-export
- Export print-quality PDF from diagrams
Note | Screenshot/Example |
---|---|
Screenshot of drawio "minimal" UI with export options | |
The beginning of an interactive computational poster | |
A mixed computational/creative roadmap for this project |
- Try on
- or follow the Installation instructions and Start JupyterLab
- Import a
drawio
from diagrams.net with the File Manager- or create a new blank (or customized) Diagram from the Launcher
- Use the Command Palette to Export Diagram to various formats
-
NOTE: some of the built-in UI features of drawio don't work properly inside an IFrame in JupyterLab, and are difficult to robustly disable: please see Diagram options available in the Command Palette and various Main Menu menus.
-
- Build interactive diagrams with
ipydrawio.Diagram
fromIPython
- Use the
application/x-drawio
MIME renderer
- Change the Diagram Theme from the Settings
Use Advanced Settings to modify drawio embedding parameters
ipydrawio-export
can generate print-quality PDF. This approach relies on a
headless browser, powered by @jgraph/draw-image-export2, puppeteer
, and
nodejs
.
- native dependencies as required to appease
puppeteer
- if running in
docker
, this can be a bit trial-and-error - for more, see the binder and CI.
- if running in
nodejs>10,<14
fromconda
or your system package manager- NOTE: this relies on being able to install
puppeteer
(and other arbitrary dependencies withjlpm
for now when first used- we'll figure out a better approach soon enough
- NOTE: this relies on being able to install
pip install ipydrawio-export
orconda install -c conda-forge ipydrawio-export
For example to install all the dependencies:
conda install -yc conda-forge ipydrawio-export
All files herein, unless otherwise noted, are free software licensed under Apache 2.0.
The copyright holders of this extension are the contributors to this repository.
Portions of the JupyterLab components are derived from QuantStack/jupyterlab-drawio.
The copyright holders of drawio and drawio-export is jgraph.
The original source code vendored in this package from:
Copyright 2021 ipydrawio contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.