Replies: 1   Views: 519
Format images in embedhtml
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 adiXelp  · 13-05-2021 - 16:25

I have html content coming in from ckeditor, I pass this content to embedHTML() with strictWordStyles as true and apply paragragh and character styling, is there a way that I can apply image styles for images coming in the content? I am looking to keep a constant height and width of images for entire document.

Posted by admin  · 13-05-2021 - 19:11


If you are setting strictWordStyles as true then most CSS styles are not applied (

strictWordStyles  bool    If true ignores almost all CSS styles and uses the styles set via the wordStyles option (see next).

You'd need to use width and height attributes instead of CSS styles. Or use HTML Extended and CSS Extended:, but this feature is available only in Premium licenses.

On you can read more information about working with img tags and the available styles and attributes.