Table Of Contents
The table of contents plug-in provides a quick way to insert a table of contents and index to a document. The entries are automatically created from the level 1 and 2 headings in the document.
Installation
Installing the table of contents plug-in requires adding the jar file and a custom menu item. To add the jar file, use the JavaScript:
elj.addJar("toc.jar", "com.ephox.toc.Toc");
The custom menu item element is:
<customMenuItem name="createTableOfContents" action="raiseEvent" value="createTableOfContents" text="Generate Table of Contents"/>
In the example configuration file, it's located under the Tools menu.
Usage
Users create their document as normal, using the appropriate Heading 1 and Heading 2 styles to label headings and then select "Generate Table of Contents" from the menu. The plug-in will insert a table of contents at the top of the page and an index at the bottom. If the index or table of contents already exists, it will be updated.
Required Libraries
None.
Known Limitations
- There's no way to add specific words in content to the index, making it more of a sorted table of contents.
- Changes to the table of contents or index made by the user will be lost when the table of contents and index are updated.
Download
Get the table of contents plug-in.
Ephox Technical Support does not cover LiveWorks! code, integrations or plug-ins.
Please direct any support requests or general enquiries about any LiveWorks! code, integrations or plug-ins to the LiveWorks! community mailing list. This code is released as-is with no support and no warranty and is installed at your own risk. We recommend thorough testing of any LiveWorks! project before deploying to any production system.

