-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Why don't you expose $styles on HTML parser for the meantime? #417
Comments
This was referenced Nov 12, 2014
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
By reading the source code in
\PhpWord\Shared\Html
I understand that you are planning on getting the stylesheets from the inlinestyle=""
tag, which could be good to begin with but comes sort when it comes to existing content that makes use of css classes.In the meantime if you could change this:
public static function addHtml($element, $html, $fullHTML = false)
to this
public static function addHtml($element, $html, $fullHTML = false, $styles = array()) {
and accordingly pass
$styles
down toself::parseNode($node->item(0), $element, $styles);
you would make it possible to have stylesheets on the html reading like so:I would suggest taking a look at dompdf (https://github.com/dompdf/dompdf) and especially at (https://github.com/dompdf/dompdf/blob/c3527d98d03e61847bd25f9e5cedf86dcc46bebf/include/stylesheet.cls.php) which actually parses a css file or a script tag.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: