hedgedoc/src/components/editor/markdown-renderer/replace-components
Erik Michelson fd378cf89b
Added TOC and anchors for headings (#243)
* Added TOC support and anchors for headings

* Moved @types/markdown-it-anchor from devDependencies to dependencies

* Add subnode renderer

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Added node-replacer for toc generation

ul lists may not be nested inside a p element. Therefore replaces this replacer every p that has a div.table-of-contents inside of it with the div directly.

* Add index to replacer function

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Add TOC to example code

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Remove unused import

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Removed unnecessary div wrapper of toc

* Fixed toc-renderer

Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-21 14:04:37 +02:00
..
gist Added TOC and anchors for headings (#243) 2020-06-21 14:04:37 +02:00
one-click-frame Refactor video-util.ts and rename markdown-preview (#233) 2020-06-20 21:05:24 +02:00
pdf Added TOC and anchors for headings (#243) 2020-06-21 14:04:37 +02:00
toc Added TOC and anchors for headings (#243) 2020-06-21 14:04:37 +02:00
vimeo Added TOC and anchors for headings (#243) 2020-06-21 14:04:37 +02:00
youtube Added TOC and anchors for headings (#243) 2020-06-21 14:04:37 +02:00
codi-md-tag-utils.ts Refactor video-util.ts and rename markdown-preview (#233) 2020-06-20 21:05:24 +02:00