We Gave Craft a Watch

We just released Craft 0.9.2216, which added a few pretty cool new features.

Time support

That’s right – you can finally set the time of day within entry Post/Expiration Date fields, as well as within your Date fields. We’re even displaying the time in the proper 12 or 24-hour format depending on your preferred locale.

Dates and times are displayed in the site’s timezone (set in Settings > General), but continue to be stored in UTC.

Rich Text improvements

The Rich Text fieldtype got a lot of love in this update. We dropped the Min Height setting in favor of full-blown custom Redactor config support. Now you can place .json files in craft/config/redactor/, and they will be available config options when editing your Rich Text fields. We’ve even started bundling two configs with Craft for you – Simple and Standard.

Next up, while we wait for Redactor 9.0 with its promised HTML output improvements, we figured we’d give Rich Text fields a new “Clean up HTML?” setting. If it’s checked (and it’s checked by default), Craft will remove all <span> tags, empty tags, and most style attributes from the submitted HTML.

And finally, we’ve written a new Page Break plugin for Redactor, which is included in the new “Standard” config. It adds a new button to your Redactor fields labelled “Insert Page Break”. When you click it, Craft adds a marker to your content at the insertion point. There are three template functions available to you for getting all individual pages in an array, getting a specific page, and getting the total number of pages. The final code example on that page is exactly how we’re doing the “Read more” links on pixelandtonic.com/blog.

comments powered by Disqus