

How we built our HTML email editor using liquid, wysihtml5 and premailer - atestu
http://customer.io/blog/Email-wysiwyg-editor-inspired-by-jekyll.html

======
chadyj
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...](http://www.chadyj.com/post/21569743980/content-sections-as-poetry-an-
email-wysiwyg) 2\. [http://www.chadyj.com/post/21158280879/die-wysiwyg-die-
lets-...](http://www.chadyj.com/post/21158280879/die-wysiwyg-die-lets-focus-
on-content-instead) 3\. [http://www.chadyj.com/post/20729167319/email-
newsletters-are...](http://www.chadyj.com/post/20729167319/email-newsletters-
are-broken-there-has-to-be-a-better)

------
jfhollingworth
Out of interest, is that using <https://github.com/jhollingworth/bootstrap-
wysihtml5>?

~~~
jrallison
Hey James,

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

Thanks so much!

~~~
jfhollingworth
Awesome! I'm glad you like it :)

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

~~~
jrallison
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.

Cheers!

~~~
dullboy
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...

------
corkill
What service do you use to send the emails?

------
drivebyacct2
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.

