CSS Inliner

By Toledoh - December 4, 2014

Hi Guys,

Just wondering if you have looked at adding a css inliner to the newsletter plugin?

ie: http://zurb.com/ink/inliner.php

https://github.com/jjriv/emogrifier

https://github.com/tijsverkoyen/CssToInlineStyles

Cheers,

Tim (toledoh.com.au)

By claire - December 8, 2014

Hi Tim

I think we'd consider it if it were requested :) I'll refer this to Dave.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Dave - December 8, 2014

Hi Tim, 

How would see that being added?  And could you implement it currently by using the inline styles in a template or wysiwyg with the "html" button?

Dave Edis - Senior Developer
interactivetools.com

By Toledoh - December 8, 2014

I guess I'm looking at having the styles in a <style></styles> like the Custom CSS field, although it would be handy to have those styles applied to the WYSIWYG when the user edits the message.

Then, when the email is sent, the inliner is run, so rather than the <style> being put in to the head (where gmail etc strip it out) the styles are then turned to inline styles.

Cheers,

Tim (toledoh.com.au)

By Toledoh - January 18, 2015

Hey Guys,

Have you had any further thoughts on this?

Cheers,

Tim (toledoh.com.au)

By claire - January 19, 2015

I think it would probably be quite tricky, but I could build it.

Let's say it would consist of a section where styles are stored, each with a name and CSS file associated with it. Then in the actual newsletter, you'd use a dropdown to select the style, and the system would try to convert the contents of the CSS file to inline styles applied to each HTML element in the email itself.

Does that sound right?

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Toledoh - January 20, 2015

Hi Claire, I think that's too complicated.

I think the css section is just a text box where we can past a bunch of css.  Then, when editing the newsletter, could this block would be inserted "on-the-fly" into the wysiwyg-custom.css so those styles appear in the style-select dropdown?

This isn't the main requirement though - I'm mainly wanting to have the inliner functionality.

Cheers,

Tim (toledoh.com.au)

By claire - January 21, 2015

Hi Tim - I think it could be done. But the wysiwyg-custom.css is a plain stylesheet, no PHP running in it. If you want to just get the styles into the dropdown somehow, it'd mean hooking into the dropdown with JS and making sure that TinyMCE doesn't break or start behaving oddly.

So it's definitely possible, yeah.

I'll have to brush up on email formatting. Last time I discussed it with one of my designer friends, she was of the opinion that making an email show up consistently across all clients was one step down from voodoo.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Toledoh - January 21, 2015

Thanks Claire.

I understand that the CSS may be difficult - lets not worry about it as I can manually include them in the template.

Can you please review the inliner aspect?  This IS important as popular browsers still strip out the <style> tag (gmail!) so to be able to give my clients any ability to really edit their own emails to a consistent style, we MUST be able to convert the styles to inline.

Thanks!

Cheers,

Tim (toledoh.com.au)