# Suggestion: Documentation for Table of Contents

**URL:** https://discourse.joplinapp.org/t/suggestion-documentation-for-table-of-contents/9152
**Category:** Features
**Created:** [2 June 2020 12:39 UTC](https://discourse.joplinapp.org/t/suggestion-documentation-for-table-of-contents/9152 "2020-06-02T12:39:53Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Langosh](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/langosh/32/2810_2.png) [@Langosh](https://discourse.joplinapp.org/u/Langosh)
#### Post date: [2 June 2020 12:39 UTC](https://discourse.joplinapp.org/t/suggestion-documentation-for-table-of-contents/9152/1 "2020-06-02T12:39:53Z")

</div>

Hi, just a suggestion to add the ToC feature and it’s usage to some documentation somewhere. As it is, there is the ToC plug-in in the setting, but to find out what it is and how it is used one has to scour the forum (which is just putting [[TOC]] somewhere in the note as far as I understood it, optionally with the custom CSS modification to make it floating).

---

<div class="post-metadata">

### Author: ![dpoulton](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/dpoulton/32/29723_2.png) [@dpoulton](https://discourse.joplinapp.org/u/dpoulton)
#### Post date: [2 June 2020 13:30 UTC](https://discourse.joplinapp.org/t/suggestion-documentation-for-table-of-contents/9152/2 "2020-06-02T13:30:40Z")

</div>

@Langosh

There is a page on the Joplin site. Admittedly it took me a while to find it again and I knew it was there!

[https://joplinapp.org/markdown/](https://joplinapp.org/markdown/)

The **TOC** is listed under “Plugins”.

---

<div class="post-metadata">

### Author: ![Langosh](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/langosh/32/2810_2.png) [@Langosh](https://discourse.joplinapp.org/u/Langosh)
#### Post date: [2 June 2020 14:44 UTC](https://discourse.joplinapp.org/t/suggestion-documentation-for-table-of-contents/9152/3 "2020-06-02T14:44:26Z")

</div>

Indeed it is there, somehow it eluded me. In that case, sorry for the post and thanks!

---

<div class="post-metadata">

### Author: ![cyr06](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/cyr06/32/4458_2.png) [@cyr06](https://discourse.joplinapp.org/u/cyr06)
#### Post date: [2 June 2020 15:04 UTC](https://discourse.joplinapp.org/t/suggestion-documentation-for-table-of-contents/9152/4 "2020-06-02T15:04:52Z")

</div>

but it misses some features like $\<toc{“level”:[1,2]}\>  
to specify what level you want to have in your TOC (h1 & h2 in this case)

---

<div class="post-metadata">

### Author: ![iotkb](https://avatars.discourse-cdn.com/v4/letter/i/cab0a1/32.png) [@iotkb](https://discourse.joplinapp.org/u/iotkb)
#### Post date: [26 August 2021 13:13 UTC](https://discourse.joplinapp.org/t/suggestion-documentation-for-table-of-contents/9152/5 "2021-08-26T13:13:22Z")

</div>

> [@cyr06](#):
>
> $\<toc{“level”:[1,2]}\>

Just a little sidenote for those who copy/paste this line: Watch out for those quotes. It took some time for me to find out why this useful feature didn't work for me 😉

I did actually read the TOC plugin page but it didn't give me a clue on how to use the 'level' modifier.

---

<div class="post-metadata">

### Author: ![Eduardo](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@Eduardo](https://discourse.joplinapp.org/u/Eduardo)
#### Post date: [29 August 2021 13:03 UTC](https://discourse.joplinapp.org/t/suggestion-documentation-for-table-of-contents/9152/6 "2021-08-29T13:03:48Z")

</div>

Hi @cyr06  
Maybe I misunderstood the feature your point out but this does not show a different behaviour between `[TOC]` and `$<toc{“level”:[1,2]}>` with more than 2 levels

 ![2021-08-29_09-50](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/6/6876fd85dcc184073ad0f17be22a553910d4465c.png)  
 ![2021-08-29_09-49](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/b/b1456e2d16468092a935a00e3e44bfacfb7f306d.png)  
Could you explain how is working?

---

<div class="post-metadata">

### Author: ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)
#### Post date: [29 August 2021 14:35 UTC](https://discourse.joplinapp.org/t/suggestion-documentation-for-table-of-contents/9152/7 "2021-08-29T14:35:41Z")

</div>

> <https://github.com/laurent22/joplin/pull/2005>
>
> This change fixes a few issues with the toc plugin.
> Additionally it now allows …to set inline options. e.g. to set the max toc depth.
> 
> 1. set toc depth to 2 levels
> 
> \`\`\`
> $\<toc{"level":\[1,2\]}\>
> \`\`\`
> 
> 2. set toc depth to 3 levels and use an ordered list
> 
> \`\`\`
> $\<toc{"level":\[1,2,3\],"listType":"ol"}\>
> \`\`\`
> 
> /ref https://github.com/nagaozen/markdown-it-toc-done-right/issues/16
> 
> \---
> 
> fixes #1953
> fixes #1843
> fixes https://discourse.joplinapp.org/t/set-depth-of-toc/2899
> 
> \<!--
> 
> Please prefix the title with the platform you are targetting:
> 
> \- "Desktop" for the Windows/macOS/Linux app (Electron app)
> \- "Mobile" for the mobile app (or "Android" / "iOS" if the pull request only applies to one of the mobile platforms)
> \- "CLI" for the CLI app
> 
> If it's not related to any platform (such as a translation, change to the documentation, etc.), simply don't add a platform.
> 
> For example: "Desktop: Added new setting to change font", or "Mobile: Fixed config screen error"
> 
> PLEASE READ THE GUIDE FIRST: https://github.com/laurent22/joplin/blob/master/CONTRIBUTING.md
> 
> \--\>
