Premailer.io

08 July 2015   3 comments   Python, Web development, AngularJS, Javascript

http://premailer.io/

Powered by Fusion×

Premailer is a Python library for turning a HTML + CSS into HTML with all the CSS embedded as inline style attributes. This is sadly very necessary to ensure that your fancy HTML emails look spiffy across all email clients and email webapps.

So, last week I put together a little site to test the library via a browser: Premailer.io

It's just a simple webapp with a form where you can enter HTML in three different ways; textarea, by URL and by file upload.

You can also override all the possible advanced options that premailer supports.

What's kinda cool is that you can get a preview of how the HTML document will look like in an iframe that is dynamically loaded with the result from the conversion.

The webapp is of course open source and available on github.com/peterbe/premailer.io. The front-end is an AngularJS app and the build system is Lineman.js. The server is a Falcon server running on uWSGI via Nginx.

There's very little fancy here. There's no limitations or protections. I just hope it becomes handy for people to test premailer out.

The inspiration came from MailChimp's CSS Inliner Tool which is cute but very basic and doesn't allow you the same kinds of input.

If anybody with some AngularJS or highlight.js chops has time I'd love to help fix why the HTML is not syntax highlighted.

Comments

Nlls
Hey Peter,
premailer.io seems to be broken at the moment. Always gives a server error back, regardless of how big or small of a Html I put in the text-area.
Did you turn off support?

Best,
Nils
Peter Bengtsson
Thanks for letting me know. I'll take a look.
Peter Bengtsson
Seems to work now.
Thank you for posting a comment

Your email will never ever be published


Related posts

Previous:
Find what indentation your files use 07 July 2015
Next:
Visual speed comparison of AngularJS and ReactJS 20 July 2015
Related by Keyword:
Ultrafast loading of CSS 01 September 2017
Premailer 3.0.0 - classes kept by default 07 June 2016
CSS Bloat Comparison 03 June 2016
How to no-mincss links with django-pipeline 03 February 2016
django-semanticui-form 14 September 2015
Related by Text:
premailer now with 100% test coverage 22 August 2014
Premailer 3.0.0 - classes kept by default 07 June 2016
How to use premailer as a command line script 13 July 2012
Visual speed comparison of AngularJS and ReactJS 20 July 2015
premailer.py - Transform CSS into line style attributes with lxml.html 11 July 2009