Week
42
Tonic Labs
Oct 14
  • Dec 14 Update

    • Morning Call

    • Start work on Framer site

Tonic Labs
Oct 13
  • Chat to Jen about using ContentEditable with PDF Templates and for loops

    • Problem: When exposing a liquid template in a contenteditable field, certain features of liquid templating break. The feature that's relevant currently, is the ability to use for loops, but there are other features that will break too.

    • Our potential options for this are:

    • 1. Build our own non-wysiwyg two-pane editor: This would consist of a code editor on the left, and a preview on the right. In this implementation, users would be able to use all liquid template features, like for loops, but they would need to edit the actual code - they would have no visual editor as they have now.

    • 2. Stick with contenteditable and write custom helpers on a case by case basis. This means that any time we want to use for loops in a pdf template, a developer would need to custom code something for that particular use case. This does preserve the visual editor but means non-technical users can't easily work with repeatable content.

    • 3. The Nuclear Option: Would be to find a solution that preserves both liquid templating and visual editing. There are wysiwyg editors out there, but the difficulty here is 1. Ensuring they support/preserve the structure of our current templates (many don't support tables/grids), and 2. Neatly integrating them with liquid features. The closest solution I've found for this is Dropkiq with Summernote (example here), but this is untested and unproven. For reference, even Shopify - who create Liquid and is built for non-technical people, doesn't expose a visual editor.

    • The big question: Should the visual edit feature of PDF templates be a core feature that should let Greenore staff have deep control over building and editing their templates, or is it a nice to have tool that will let them fix spelling mistakes, make minor changes to order and position. My sense is that it's the latter, and in that case I think we should stick with option 2 above, which is what I've asked Jen to do. @AJ if that's an incorrect assumption let us know and we can chat on the next call.

    • Research & Links

    • Customer.io in 2012 - Used whsihtml5 which is no longer maintained

    • Maglev - rails page builder

    • Dropkiq