How we built our HTML email editor using liquid, wysihtml5 and premailer
customer.io
customer.io
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...
This is John at Customer.io here. We are absolutely using your work. It was a joy to use.
Thanks so much!
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!
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...
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.