Skip to content

Commit 2deaa40

Browse files
committed
docs: add note about ipywidgets
1 parent 0a95589 commit 2deaa40

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/render/interactive.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,22 @@ show(p)
9090

9191
## ipywidgets
9292

93+
:::{note}
94+
IPyWidgets uses a special JS package `@jupyter-widgets/html-manager` for rendering Jupyter widgets outside notebooks. `myst-nb` loads a specific version of this package, which may be incompatible with your installation of IPyWidgets. If this is the case, you might need to specify the appropriate `nb_ipywidgets_js` config value, e.g. for `0.20.0`
95+
```yaml
96+
97+
sphinx:
98+
recursive_update: true
99+
config:
100+
nb_ipywidgets_js:
101+
# Load IPywidgets bundle for embedding.
102+
"https://cdn.jsdelivr.net/npm/@jupyter-widgets/[email protected]/dist/embed-amd.js":
103+
"data-jupyter-widgets-cdn": "https://cdn.jsdelivr.net/npm/"
104+
"crossorigin": "anonymous"
105+
```
106+
To determine which version of `@jupyter-widgets/html-manager` is required, find the `html-manager` JS package in the [`ipywidgets` repo](https://github.com/jupyter-widgets/ipywidgets), and identify its version.
107+
:::
108+
93109
You may also run code for Jupyter Widgets in your document, and the interactive HTML
94110
outputs will embed themselves in your side. See [the ipywidgets documentation](https://ipywidgets.readthedocs.io/en/latest/user_install.html)
95111
for how to get set up in your own environment.

0 commit comments

Comments
 (0)