Forum


Replies: 1   Views: 1214
Problem html ckeditor to docx
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  · 19-07-2021 - 07:34

Hello,

It seems you are applying htmlentities (https://www.php.net/manual/es/function.htmlentities.php) or a similar function to the HTML content before adding it with embedHTML, so the tags are added instead of being transformed. If you are sending HTML entities you may need to use html_entity_decode (https://www.php.net/manual/en/function.html-entity-decode.php) to get the correct HTML to transform it.

On https://www.phpdocx.com/documentation/cookbook/wysiwyg-editor there's a sample using the output of CKEditor. It seems the problem comes from how your code is sending the HTML content to PHP.

We recommend you to check the HTML content you are adding, the setup of CKEditor and how you are sending the HTML to PHP (using AJAX or any other approach). Please note that this is not a phpdocx problem but how the HTML content to be transformed is being sent to phpdocx.

Regards.