Forum


Replies: 1   Views: 1350
Trying to add html forms and other tags to docx before converting to html
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 admin  · 26-12-2020 - 19:53

Hello,

The replaceVariableByText method doesn't transform HTML, this method replaces a placeholder by a new text (plaing strings).

If you want to replace a placeholder with HTML you need to use replaceVariableByHTML. But please note that this method supports many HTML tags and CSS styles but not all, for example HTML canvas tag isn't supported when transforming HTML. We recommend you to read the following pages that detail all suported contents and styles when transforming HTML:

Instead of a canvas you could add an input field or other MS Word content type to generate a box when transforming HTML. Also please note that some HTML tags and CSS styles don't have a MS Word equivalent.

Regards.