HTML Extended: <phpdocx_tablecontents> tag

<phpdocx_tablecontents> tag

PREMIUM TRIAL / ADVANCED

Inserts a Table of Contents (TOC).

HTML Extended (Premium licenses)
Attribute Description
data-autoUpdate If true it will try to update the TOC when first opened.
data-displayLevels Must be of the form "1-3" where the first number is the start level an the second the end level. If not defined all existing levels are shown.
data-legend The placeholder text that will be shown if the autoupdate option is not activated.
data-stylesTOC Path to a DOCX. This optional parameter allows to extract the TOC styles from an existing Word document so the embedded TOC can be fully customized.
Code samples

Example #1

AخA
 
1
<phpdocx_tablecontents data-autoUpdate="true" data-stylesTOC="stylestoc.docx"/>
2
<h1 style="color: #b70000">1st level heading</h1>
3
<h2 style="color: #b70000">2nd level heading</h2>
4
<h3 style="color: #b70000">3rd level heading</h3>
5
    

The resulting Word document looks like:

­
­