{"id":178,"date":"2010-08-02T17:31:18","date_gmt":"2010-08-02T23:31:18","guid":{"rendered":"http:\/\/benincosa.com\/blog\/?p=178"},"modified":"2014-11-19T11:26:26","modified_gmt":"2014-11-19T17:26:26","slug":"haml-and-jeditable","status":"publish","type":"post","link":"https:\/\/benincosa.com\/?p=178","title":{"rendered":"HAML and jEditable"},"content":{"rendered":"<p>One of the problems with jEditable and HAML is that HAML puts whitespace in the form automatically.\u00a0 So my HAML script looks like this:<\/p>\n<pre>%td{ :class =&gt; 'edit_area', :id=&gt;\"#{k}_#{f}\" }\r\n  = format_table_value(f, v[f])\r\n<\/pre>\n<p>The problem with this in jEditable is that now once the user clicks on it, there is gobs of white space around the word.\u00a0 To get rid of this you use HAML&#8217;s fancy no whitespace flag &#8216;&lt;&#8216;.\u00a0 This looks like:<\/p>\n<pre>%td{ :class =&gt; 'edit_area', :id=&gt;\"#{k}_#{f}\" }&lt;\r\n  = format_table_value(f, v[f])\r\n<\/pre>\n<p>This is an example of how one simple character can really help improve the user experience \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the problems with jEditable and HAML is that HAML puts whitespace in the form automatically.\u00a0 So my HAML script looks like this: %td{ :class =&gt; &#8216;edit_area&#8217;, :id=&gt;&#8221;#{k}_#{f}&#8221; } = format_table_value(f, v[f]) The problem with this in jEditable is that now once the user clicks on it, there is gobs of white space around&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[40,24],"tags":[69,70,71],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/178"}],"collection":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=178"}],"version-history":[{"count":2,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/178\/revisions"}],"predecessor-version":[{"id":2819,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/178\/revisions\/2819"}],"wp:attachment":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}