Open
Description
Environment data
- VS Code version: 1.101.0
- Jupyter Notebook Renderers: 1.1.0
- Jupyter Extension version (available under the Extensions sidebar): 2025.5.0
- Python Extension version (available under the Extensions sidebar): 2025.8.0
- OS (Windows | Mac | Linux distro) and version: Mac 15.3 (24D60)
- Python and/or Anaconda version: 3.11
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): poetry
- Jupyter server running: Local
Expected behaviour
You can click hyperlinks generated within plotly figures. Links in regular print statements and markdown print both work in VSCode.
Actual behaviour
Links only work in the browser render, not the VSCode one.
Steps to reproduce:
The link does not work in a Jupyter notebook in VSCode:
import plotly.graph_objects as go
fig = go.Figure()
fig.add_scatter(x=[1, 2, 3], y=[4, 5, 6])
fig.update_layout(
title='<a href="https://www.google.com" title="https://www.google.com">Click here to open Google</a>',
)
fig.show()
But if rendered outside of VSCode, the link works:
import plotly.graph_objects as go
fig = go.Figure()
fig.add_scatter(x=[1, 2, 3], y=[4, 5, 6])
fig.update_layout(
title='<a href="https://www.google.com" title="https://www.google.com">Click here to open Google</a>',
)
fig.show(renderer='browser')
I'd like to be able to render within the notebook and have the links still work properly. Is there a setting in VSCode I can change to make this work?
This is most similar to this issue, which was not resolved: #13659