I working on a heading component that could have two lines. I would like to make it possible for the content manager to specify the breaking point of the line so that the output would look like this:
<h1 class="heading heading-large">
The fastest way to <br>build the fastest sites.
</h1>
I wonder how should I structure the content in Prismic. So far I have come up with two solutions, yet they seem not ideal ...
Solution 1
Title: title_line_one -> line 1
Title: title_line_two -> line 2
I don’t understand what the issue is with the second one ?
Using shift+enter (cmd+enter on mac) you can insert a in the richtext field (or in the header field) so the output would be exactly what you showed in your initial example…
<h1 class="heading heading-large">
The fastest way to <br>build the fastest sites.
</h1>
You should just use a rich text field in this case rather than a title field. Just make sure to disable everything that's not a 'heading' and enable 'multi line paragraphs'. This should give you the functionality that you need.