Replies: 7   Views: 3434
Real time wysiwyg docx editing
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 borlemanski44  · 04-09-2016 - 21:47

Can this library allow the import of Docx template files into a WYSIWIG editor via HTML, which can the be edited and then saved/exported as a Docx file? How would this be done? Docx to HTML to Docx conversion?

Posted by admin  · 05-09-2016 - 06:41


The conversion plugin, available in Corporate and Enterprise licenses, allows to transform DOCX to HTML; being possible to open it in a browser or WYSIWYG. This same conversion plugin can transform DOCX to DOC and DOC to HTML (among other formats such as DOCX to PDF, DOCX to ODT, DOC to DOCX...). HTML can be transformed to DOCX using the embedHTML method (


Posted by borlemanski44  · 11-09-2016 - 20:29

I've purchased the corporate version, but am having trouble understanding how to PHP echo the converted DOCX HTML into the WYSIWYG Div that I've created. Could you explain how this can be done or do you have a tutorial? 

Posted by admin  · 12-09-2016 - 09:30


Do you know how to transform DOCX to HTML using the conversion plugin? Or do you only have issues adding the generated HTML to the WYSIWYG?


Posted by borlemanski44  · 12-09-2016 - 15:24

I need help with both docx to html, but mostly with outputing the HTML into a WYSIWYG.

Posted by admin  · 12-09-2016 - 18:29


The first step is to install the conversion plugin. Please follow the information available on:

Using this conversion plugin (we recommend the one based on LibreOffice) you can transform DOCX to HTML.

When you have finished this step and you can transform DOCX to HTML, please reply this same topic.


Posted by borlemanski44  · 13-09-2016 - 18:17

I've got the Docx to HTML conversion to work. How do I make the HTML echo into the WYSIWYG instead of generating a downloadable file?

Posted by admin  · 14-09-2016 - 07:13


The conversion plugin generates a HTML file after transforming the DOCX, so you just need to load this HTML in the WYSIWYG you're using.

For example, if you use CKEditor (, you just need to create a textarea, set the CKEditor to this textare and load the HTML into it. We recommend you to check the documentation of the WYSIWYG you use.

As the conversion plugin generates a whole HTML page (with html, head, body and other tags). If your WYSIWYG needs only the body content, you can filter the content you want to add using the DOMDocument functions from PHP or JavaScript.