Forum


Replies: 2   Views: 142
How can i transform word to html from internal to inline style ?

Posted by admin  · 20-07-2022 - 14:23

Hello,

DOCX to HTML transforms styles as CSS styles (using style tags), not as inline styles. If you need inline styles, we recommend you to use an external library or program to transform the HTML output returned by phpdocx. On https://www.phpdocx.com/documentation/cookbook/wysiwyg-editor you can read this same recommendation:

phpdocx transforms DOCX to HTML, generating non inline CSS styles by using style tags. Some WYSIWYG editors require using inline styles. In these cases, it is advisable to convert the HTML obtained with phpdocx to an HTML with inline styles. There are many tools and libraries fit for this purpose, including native PHP solutions: https://stackoverflow.com/questions/3990706/php-class-to-inline-css-styles

Regards.