toc-util
v1.0.4
Published
## Usage
Downloads
4
Readme
toc-util
Usage
import { makeTocElement } from 'toc-utl';
const firstHeadingElement = document.querySelector('h2') as HTMLHeadingElement;
const tocElement = makeTocElement(firstHeadingElement, { firstLevel: 2, lastLevel: 4 });
document.querySelector('.left-side').prepend(tocElement);