-
Notifications
You must be signed in to change notification settings - Fork 2.7k
ListItem inhert from AbstractContainer better ? #230
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
Comments
Good catch, @basjan. I even think that ListItem could be inherited from TextRun. We just started the composite refactoring on 0.10. I'm still working on refactoring for HTML and RTF writers now. You can see for yourself that the code structure is rapidly changing in the last couple of days. Feel free to experiment and request a pull. |
OK. I will first work a bit more on my \PhpOffice\PhpWord\Shared\Html::addHtml function and then take a look at the ListItem class |
You might want to look at another implementation here :) |
I did look at that package, before I decided that the PHPOffice is better. My main problem with the PHPDocX package is that "The PRO+ and CORPORATE version need JRE 1.5 or higher in order to run the advanced conversion plugin" (see http://www.phpdocx.com/help/faq) What I consider the main advantage of PHPOffice is that you build an object oriented model of a document and only at the end one decides whether it should be outputted as DocX, ODF, PDF etc. Looking at the embedHTML function of PHPDocX, it appears to me that the HTML is converted directly into WordML and not to an object oriented model. (see also http://www.phpdocx.com/documentation/html-to-word-PHP) My first attempt of implementing HTML into PHPWord, as committed in #209 was similar. At the moment I am working on a function, which takes the HTML and dissects it into elements and adds these elements to the document object. |
Ok. Looking forward to see it implemented. Thanks. |
I came across the ListItem element and I was wondering if it would not be better if the ListItem was inherited from the AbstractContainer class instead of the AbstractElement class ?
At the moment a structure like:
Seems not possible at the moment.
Considering the other elements, it would be, in my opinion, more logical if one could code the following:
The text was updated successfully, but these errors were encountered: