-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support for bgcolor #14
Comments
Look like the new version of Juice supports it https://github.com/Automattic/juice/blob/master/client.js#L23 so we'll have to up our version |
@aj1991 version juice : {
applyAttributesTableElements: true
} |
Was there a result for this, I have been looking into how to get it working. Does it require a separate file to tell it to take the CSS and apply it as the HTML attribute? |
@HowardChris You'll have to set the index.html <!DOCTYPE html>
<html>
<head>
<style>
table { background-color: red; }
</style>
</head>
<body>
<table> .... </table>
</body>
</html> main.js var EmailBuilder = require('email-builder-core');
var emailBuilder = new EmailBuilder({
juice: {
applyAttributesTableElements: true
}
}); output.html <!DOCTYPE html>
<html>
<head>
</head>
<body>
<table style="background-color: red;" bgcolor="red"> .... </table>
</body>
</html> |
@jeremypeter thanks for the info, I will see if I can add this into my current workflow. Still learning grunt to try and automate my emails but configuring the Gruntfile.js is still a learning curve |
Hi @jeremypeter Do you know if there is also an option to not strip out the self-closing tags, When compiled it is removing them. For exmaple Any information is appreciated. Thanks, |
@HowardChris var EmailBuilder = require('email-builder-core');
var emailBuilder = new EmailBuilder({
juice: {
applyAttributesTableElements: true
},
cheerio: {
xmlMode: true
}
}); |
Hi @jeremypeter thanks for all your help on this I really appreciate it, I got those options added and are now working perfect |
Hey guys,
first: I really thank you for developing such a tool - great work!
Now, I came to a point I needed support for the bgcolor-attribut due to problems in different email "browsers".
Is there a possibility to add a "bgcolor=COLOR" attribute when having a "background-color" attribute in my css file?
The text was updated successfully, but these errors were encountered: