Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Battle for the Body Field

The Battle for the Body Field

A deep dive into the problem of semi-structured content, lessons form the technical communications community, and a plan for WYSIWYG editors that don't break the web site. Originally presented at DrupalCon 2014 in Austin, video available at: https://www.youtube.com/watch?v=9BwufXmG-yE

Jeff Eaton

June 04, 2014
Tweet

More Decks by Jeff Eaton

Other Decks in Technology

Transcript

  1. The Battle For The Body Field Fighting the right battles

    Solving the right problems Building the right tools 1 @eaton : #drupalcon : #bodybattle : 4/6/2014
  2. THE WYSIWYG WARS 3 Ugly markup Lazy editors Markdown Easy

    Clean markup Markup Literacy Real HTML Hard
  3. THE WYSIWYG WARS 3 Ugly markup Lazy editors Markdown Easy

    Clean markup Markup Literacy Real HTML Hard NO!
  4. ‣ Chunks vs. Blobs is insufficient ‣ HTML is insufficient

    ‣ Learn from XML, DITA ‣ Store meaning, then transform 4
  5. 12

  6. ✓ Narrative text
 Reports, documentation, long-form news ✓ Islands of

    structure
 Galleries, popup info, embeds ✓ Placement that matters
 “But the gallery goes with that paragraph!” 17
  7. 18

  8. <figure class="gallery"> <ul> <li><a href="1.html"><img src="1.jpg"></a></li> <li><a href="2.html"><img src="2.jpg"></a></li> <li><a

    href="3.html"><img src="3.jpg"></a></li> </ul> <figcaption> <a href="gal.html>Our gallery!</a> </figcaption> </figure> But Semantic HTML! 20
  9. <figure class="gallery"> <ul> <li><a href="1.html"><img src="1.jpg"></a></li> <li><a href="2.html"><img src="2.jpg"></a></li> <li><a

    href="3.html"><img src="3.jpg"></a></li> </ul> <figcaption> <a href="gal.html>Our gallery!</a> </figcaption> </figure> But Semantic HTML! 20 NO!
  10. “HTML is rich enough for a designer to represent complex

    content, but not precise enough to describe and store content in a presentation-independent fashion. WYSIWYG tools can make the problem worse: rather than shielding content creators from the complexity of markup, they make it easier to describe content using the wrong vocabulary. 23 Jeff Eaton, quoting himself, because it’s his presentation
  11. 24

  12. 26

  13. 27 <task id="signup"> <title>Signing up for health insurance</title> <taskbody> <steps>

    <step>List your dependents</step> <step>Gather past medical information</step> <step>Fill out forms 21a, 39b, and 92c</step> <step audience="retail"> Hand in your paperwork to a supervisor </step> <step audience="corporate"> Deliver your paperwork to the HR office </step> </steps> </taskbody> </task> <p conref="../boilerplate.xml#disclaimer"> This text will be replaced by the boilerplate legal disclaimer. </p>
  14. ‣ Model and store meaning ‣ Extend a core vocabulary

    29 <em> <strong> <task> ! <p audience="admin"> ! <a trust="unverified">
  15. ‣ Model and store meaning ‣ Extend a core vocabulary

    ‣ Use placeholder markup 30 <gallery id="42" caption="Our gallery!" />
  16. ‣ Model and store meaning ‣ Extend a core vocabulary

    ‣ Use placeholder markup ‣ Expand & transform for output 31
  17. ‣ Model and store meaning ‣ Extend a core vocabulary

    ‣ Use placeholder markup ‣ Expand & transform for output ‣ Tailor the editing tools 32
  18. 35

  19. 36

  20. 37

  21. 39

  22. Transform For Output ‣ Drupal filters ‣ Response handlers ‣

    jQuery plugins ‣ Angular directives ‣ Format mapping 44
  23. ‣ Store only the meaning ‣ Tailor WYSIWYG to that

    vocabulary ‣ Transform for presentation 45 ‣ Tools that match the content ‣ Cleaner integration with external systems ‣ Simpler WYSIWYG implementation ‣ Smooth transition to future standards
  24. Also Read… ‣ The battle for the body field
 alistapart.com/article/battle-for-the-body-field

    ‣ When editors design
 www.smashingmagazine.com/2013/06/26/controlling-presentation-in-structured-content ‣ Introduction to custom elements
 www.smashingmagazine.com/2014/03/04/introduction-to-custom-elements ‣ The way you design web content is changing
 www.newfangled.com/the_way_you_design_web_content_is_about_to_change ‣ The cost of leaky abstraction
 www.lullabot.com/blog/article/inline-editing-and-cost-leaky-abstractions 47