Forum


Replies: 3   Views: 1572
Gdocs is not showing headings at all
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by net7  · 25-11-2020 - 10:02

Hi!
I need to have a table of contents in my doc and I need to see it only via Google Docs, so I'm trying to display headings as explained in the documentation. I'm using both "H1,H2,H3" and "phpdocx_heading" tags, but all of them are displayed as "Normal text" in GDocs. I'm using "replaceVariableByHTML" with "useHTMLExtended" option.

Here is my code:
 

$html = <<<EOF

 <h2>Surface Preparation H2</h2>
 
 <phpdocx_heading data-text="Custom heading Surface Preparation 2" data-level="2" />

 <phpdocx_heading data-text="Custom heading Surface Preparation 1" data-level="1" />

 <phpdocx_heading data-text="Custom heading Surface Preparation 3" data-level="3" />

EOF;


Here the result:

https://drive.google.com/file/d/1naFeBkRuv0wmKqrw9E2voLTuDwpwLOVk/view?usp=sharing

You can see the (not-)headings at page 3.

Can you help me? Am I doing something wrong?