thank you very much. It works! But now my second question:
I want to insert a Table of Contents via Custom Buttom Click in my Content Parts. This is possible with this Script:
I have inserted this script into a toc.js file and put it on my webserver. Now i want to inject this:
into my document. In the head part or the body part. How can i do that?