We’ve recently been trying some new modules and techniques for giving our clients' content editors, some of whom like to describe themselves as “non-techies”, more control over the layout of their content. Previously, we’d usually give them a WYSIWYG editor with limited options, which worked relatively well until they wanted more functionality, for example, embedding images alongside text, or multiple columnss.

If they could find somebody to write HTML for them through the source code editor then this wasn’t a problem, but really we wanted a content entry solution using the node form which could do the formatting for them, whilst still allowing them significant flexibility.

Enter Paragraphs, Field Groups and Fences

The Paragraphs and Field Group modules together can be used to provide a powerful and simple content editing solution.

Paragraphs is a brilliant module which enables you to define various paragraph bundles of fields which can be used in whichever content types you enable them for. So if you create a paragraph with a row of images, another with two columns of text, another with a video embed etc., your content editor can pick and choose paragraphs in any combination.

You, the developer(s), have already set up the CSS for the paragraph, so the content should display perfectly without the editor having to do any extra work. For such a useful module it seems to be relatively underused, with just under 15,000 downloads at time of writing.

Field group isn’t quite as revelatory, but is still useful for grouping fields into attractive vertical tabs, accordions, or various other styles, to keep the backend nicely organised for content editors.

Another module we like at the moment is Fences, which enables you to provide an HTML element to wrap each field in. It doesn’t help your content editor much, but does provide prettier markup than Drupal’s standard collection of divs. It can also reduce the amount of CSS you need to write, especially if you want to make a heading field an h2 or something.

So, for future Drupal builds, we will be making paragraph planning a key part of the design discussion. It makes the content editing experience happier for the editor, as they don’t have to learn HTML, and happier for you because you don’t need to worry about them doing something which breaks your layout.