Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting in lists via addHtml #1215

Closed
rkorebrits opened this issue Dec 4, 2017 · 9 comments
Closed

Formatting in lists via addHtml #1215

rkorebrits opened this issue Dec 4, 2017 · 9 comments
Milestone

Comments

@rkorebrits
Copy link

We are having a few issues with formatting in lists. After seeing this issue: #945 I updated composer to take from the develop branch, but we are still not able to get formatting in lists.

I don't know how the documents are actually built up and maybe it is not possible to have formatting in lists, but as the documents otherwise are able to be styled perfectly and it's possible in Word to style lists, I would assume that is would be doable?

Expected Behavior

Ideally, lists with formatting (e.g. <strong>, <em>, <br>, etc.) would also be displayed like this in the Word output. Like this:

  • I am bolded.
    and I am not
  • I am italic and I am not

Current Behavior

On the develop branch all formatting is stripped. On the 0.13 branch, formatted copy is removed completely.

Context

  • PHP version: 7.1
  • PHPWord version: 0.13/develop
@troosan
Copy link
Contributor

troosan commented Dec 4, 2017

@rkorebrits Indeed, that's a known issue with lists, the formatting is currently lost.
The only improvement in the develop branch is that at least the text is kept, whereas before it was not.

@rkorebrits
Copy link
Author

Thanks @troosan
Would this be something that might be added in the near future? Not sure what the impact there is..

@samimussbach
Copy link

I do not know your release policy but wouldn't this be a reason for a new release 0.13.1? People are loosing data quite subtly (at least if they use phpword as a kind of export).
Would it be possible to release a 0.13.1 with the fix that texts in lists are at least not silently vamishing?

@troosan
Copy link
Contributor

troosan commented Dec 5, 2017

0.14 will be release soon. I haven't had the time to work on parsing the list items styling.
Feel free to submit a pull request if you have a solution for it. I would be happy to review it and merge it to the main development branch!

@rkorebrits
Copy link
Author

I'd love to spend time on this great project, but unfortunately I won't be able to in the foreseeable future. Thanks @troosan

@samimussbach
Copy link

Good news that 0.14 is near. I hope to find the time to work on a patch but I don't really understand yet what happens during the recursive parsing and the exact need for an extra Html::parseListItem()

@troosan
Copy link
Contributor

troosan commented Jan 13, 2018

fixed with #1239

@troosan troosan closed this as completed Jan 13, 2018
@samimussbach
Copy link

I can confirm that your fix works with our data, Thank you!

@rkorebrits
Copy link
Author

rkorebrits commented Jan 29, 2018

Also confimed on dev-develop branch, not on 0.14. Thanks!

@troosan troosan added this to the v0.15.0 milestone Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants