It would be great to have tools or components to be able to choose text, font, header, and other formatting controls (including word wrapping) when building a table of contents. For word wrapping how about a "convert line breaks" command like you have below:
[ATTACH=CONFIG]243[/ATTACH]
Also, the ability to have a tool to hide and reveal a table of contents.
These should all be built in tools rather than forcing users to customize HTML, JavaScript, and other coding scenarios.