Hacker News new | past | comments | ask | show | jobs | submit login
How we built our HTML email editor using liquid, wysihtml5 and premailer (customer.io)
41 points by atestu on May 31, 2012 | hide | past | favorite | 9 comments

Great work guys! I think you hit the nail on the head with the template style being the best approach for easily putting together emails with clean code. HTML email editors are in a terrible state and that is why I have created Sendicate (http://sendicate.net)

For more reasons why you should ditch the traditional WYSIWYG style approach have a look at:

1. http://www.chadyj.com/post/21569743980/content-sections-as-p... 2. http://www.chadyj.com/post/21158280879/die-wysiwyg-die-lets-... 3. http://www.chadyj.com/post/20729167319/email-newsletters-are...

Hey James,

This is John at Customer.io here. We are absolutely using your work. It was a joy to use.

Thanks so much!

Awesome! I'm glad you like it :)

How do you handle the problem that there might be HTML tags between "{{" and the keyword "content", or between "content" and "}}" ?

John at Customer.io here.

When a customer attempts to save a layout, we perform several validations including verifying valid liquid templating (http://liquidmarkup.org/) syntax and the presence of the "content" liquid tag.

If there are HTML tags between the "{{"'s, we'll present a user friendly error message.


Okay, thanks for the reply.

I myself had done the same thing for some clients.

The clients were quite confused when they saw the error message after pasting text from some external rich text editor that littered everything with <span>s.

I wonder if there is a better way...

What service do you use to send the emails?

I'm trying really hard not to scoff. This is pretty much a standard way of doing any sort of embedded content in any templating system or language that has ever existed. Ever.

I'd recommend running the child HTML through some sort of validation to clean up the markup or otherwise ensure it doesn't alter the content that follows it in the template.

Also, depending on your userbase, it may be easier, or actually recommended, to use something like Markdown instead. It won't let them shoot themselves in the foot like HTML or a rich text editor will. I've seen content that was heavily formatted and styled that looked atrocious in the template, do to the template's parental styling or just poor user taste.

Applications are open for YC Summer 2021

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact