I have a long-form article page with a Rich Text field for the main article body, since the structure of the content inside is completely ad-hoc.
Some sections inside the article body require showing images left or right-aligned with paragraph text.
For example, the rendered page HTML might end up with a structure like this:
<h2>Recipe ingredients</h2> <ul> <li>Salt</li> <li>Butter</li> <li>Flour</li> <li>Eggs</li> </ul> <h2>Getting started</h2> <p>Take the butter, flour and eggs and mix it in a bowl...</p> <div> <div style="float: left;"><img src="image-of-bowl.jpg"></div> <div><p>This is what it will look like at this point...</p></div> </div>
In Prismic, I’m able to create custom Slices that are repeatable pre-defined modules inside the page – for example, “panel with image aligned to left”, “panel with image aligned to right”. So then the author can take these “modules” and craft the article layout in a variety of ways and, likewise, our front-end code knows how to display these modules.
How can I do something like this with Contentful?
I don’t see any options for specifying alignment inside the Rich Text field, or creating these richer “building blocks”?
Note: I do not want to use separate Entry types that are embedded into Rich Text, because none of this content is re-usable outside of the individual article entry.
Thanks for any advice.