Note: People are assuming this question is already answered when in fact it is no where close to being the right answer.
The only code I have to show you is, my short code:
I have registered the hort code as toc, and tried doing
[toc] but alas nothing happens. What am I doing wrong? I don't need or shouldn't need ajax of any kind. this should be easy.
I should also state that this short code should only get the h1-6 tags that are in the post them selves and not on the page in general.