Unfortunately this doesn't work out of the box with jupyterlab (see jupyterlab/jupyterlab#1818).
I managed go get the script to load by first loading jquery like this
%%javascript
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://code.jquery.com/jquery-3.4.1.min.js';
document.head.appendChild(script);
And then
%%javascript $.getScript('https://kmahelona.github.io/ipython_notebook_goodies/ipython_notebook_toc.js')
However the TOC is not correct. The markdown headers from all the notebooks I have open (in different tabs) are meshed together.
Haven't had time to debug it properly.. maybe you have some ideas though :-)
Unfortunately this doesn't work out of the box with jupyterlab (see jupyterlab/jupyterlab#1818).
I managed go get the script to load by first loading jquery like this
And then
However the TOC is not correct. The markdown headers from all the notebooks I have open (in different tabs) are meshed together.
Haven't had time to debug it properly.. maybe you have some ideas though :-)