Add table of contents to wiki page in sharepoint 2013

How can I add an automatic table of contents in a wiki page in Sharepoint 2013 (online)?

I have already enabled the publishing service, which adds a web part called table of content, but it adds a navigation hierarchy, not a table of contents for a single page.


Omar ArmasAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rajendra ShekhawatSolution ArchitectCommented:

Community Members have achieved Table of Content for Wiki Pages using different options.

One approach is to get list of pages using REST API from Wiki Library and then create Html and embed it.

Herewith attached some of reference links for other approaches -

I hope it helps.

Jun MacIT specialistCommented:
If the wiki page contains any of the normal paragraph headings, this will automatically be added in the table of contents (right pane of the wiki page).

The navigation list is displayed on the left pane.

Hope this helps.

a quick fix is to create the wiki page in Microsoft Word. Save the docx in html and then import the html code (cut/paste) to the wiki in sharepoint.  If you've created a 'table of contents' in word, this will be created on top of the wiki page and will allow you to 'go to' the heading you've selected.  You may need to re-format the wiki page after for cosmetic purposes.

have fun !

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jun MacIT specialistCommented:
just another point -- once a MS Word document has been saved as a 'single HTML file' and if the MS Word document includes a "Table of Contents" table, same 'Table Of Contents' will be in the final wiki page and can also be used for navigating that wiki page. You will just need to split up the page after for aesthetics !

May our tribe (wiki users) increase
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.