I have Premium licenses, so i want to transform word (.docx) to html with inline style (bold, italic, etc.). i try with transformDocAdvHTML but it will add style to internal. how can i change to inline style.
I have Premium licenses, so i want to transform word (.docx) to html with inline style (bold, italic, etc.). i try with transformDocAdvHTML but it will add style to internal. how can i change to inline style.
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.