Forum


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

Hi,

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: https://www.dropbox.com/s/u64wacg8di3zb1p/chrome_4cwmnkpsj6.png?dl=0

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

Hello,

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.

Regards.

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

We slightly changed code so that we get markup as in your example: https://www.dropbox.com/s/fc537g9mvihnke2/chrome_ogxm3etwwc.png?dl=0

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

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

Hello,

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

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

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.

Regards.

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

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