Set depth of [TOC]

@laurent it is possible to set the depth with an option already. Would you accept a PR for that?

The only question is, how can I add an additional option next to the Enable table of contents extension text in the settings screen. Is that even possible?

What i need is a way to have a checkbox on the left, then text Enable specific TOC depth and then right next to it a field where I can enter a number from 1 to 10. But I haven’t seen a way to do that. Settings only seem to allow 2 elements. How can I use 3 in one line? (checkbox, text, number field).
If I wanted to go with my initial idea, the Enable table of contents extension line would need 5 elements.