Replies: 4   Views: 1328
Footnote index falls on the new line
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 Simon87  · 13-12-2019 - 12:56


Working with phpdocx 9.5, we have html:

<p>Some text <phpdocx_footnote><phpdocx_footnote_textdocument data-text="" /><phpdocx_footnote_textfootnote>footnote text</phpdocx_footnote_textfootnote></phpdocx_footnote> some other text.</p>

And we have index 1 on the new line:

Posted by admin  · 13-12-2019 - 15:30


Please check the included sample Core/embedHTML/sample_8.php that illustrates how to add footnotes from HTML Extended. Your code is not using the correct syntax.


Posted by Simon87  · 18-12-2019 - 14:17

We slightly changed code so that we get markup as in your example:

Result is the same - footnote index falls to new line. What's wrong?

Posted by admin  · 18-12-2019 - 15:10


Sorry that HTML doesn't use the required syntaxis. This is the included sample:

    <p>Here comes the </p>
    <phpdocx_footnote_textdocument data-text="&nbsp;endnote" data-bold="true" />
        <p>Text <em>footnote</em></p>
    <p>&nbsp;and some other text.</p>

As you can check, the contents and tags are in the phpdocx_footnote, and there's no wrapping paragraph (p) tag. Your HTML has contents out of phpdocx_footnote and has a wrapping paragraph, and phpdocx_footnote_textdocument should have a data-text value.


Posted by Simon87  · 21-01-2020 - 11:01

Ok, understood, thinking how we can adapt our code to this structure.