You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to point (scroll) to a specific cell when a notebook is opened in nbviewer (or jupyterlab) using url hash. This is currently possible with markdown cells which have a heading say ## My Heading so in url hash we can use #My-Heading. But some cells do not having a heading naturally and there is no way to scroll to an arbitrary cell.
We know the id of the cell which we want to point to beforehand.
Proposed Solution
Creating a div or span element before each cell with element id being the cell id (or its function). It will help in pointing to arbitrary markdown as well as code cells. I found this code section to start with. We can possibly extract cell id and prepend the required html / modify the renderer.
Problem
We want to point (scroll) to a specific cell when a notebook is opened in nbviewer (or jupyterlab) using url hash. This is currently possible with markdown cells which have a heading say
## My Heading
so in url hash we can use#My-Heading
. But some cells do not having a heading naturally and there is no way to scroll to an arbitrary cell.We know the id of the cell which we want to point to beforehand.
Proposed Solution
Creating a
div
orspan
element before each cell with element id being the cell id (or its function). It will help in pointing to arbitrary markdown as well as code cells. I found this code section to start with. We can possibly extract cell id and prepend the required html / modify the renderer.nbconvert/nbconvert/exporters/html.py
Lines 190 to 204 in 32186d8
Open for workarounds and suggestions.
The text was updated successfully, but these errors were encountered: