Forum


Replies: 24   Views: 10861
<li> with strictwordstyles = true
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 shroom  · 17-12-2015 - 17:09

This is a quick patch to add support when strictWordStyles is true:

Edit the file HTML2WordML.inc and in line 1949 (after the 'if (!$this->strictWordStyles) {') add this:

 else {
  $stringListPr .= $this->pPrSpacing($properties);
}

This got me very close to what I was after, thanks!  I did not need to style the <li>s at all.  The only thing I had to do in my inbound $html was str_replace('</ul>', '</ul><br />', $html); to provide an extra line after the last <li> before the next paragraph.  It's not perfect, but very close.

Which line in HTML2WordML.inc would I need to modify to allow it to read inline styles for the <ul> itself?  Something like <ul style="margin-bottom:1em">.  Is that possible?  If this can be done, I think it -would- be perfect.

Thanks again.