3

How can I add the functionality for my clients to make text not just bold or italic, but have h2, h3, h4 headings too?

Redactor bar

3

You can modify Craft's default Redactor configs stored in craft/config/redactor or add custom config files to this directory. Then select the config of choice for each rich text field individually in the field settings.

To use "block styles" in the editor, add the formatting button to the toolbar with this config:

{
    buttons: ['formatting', 'bold', 'italic']
}

You can also modify the formatting dropdown, if you want to restrict the block styles available to your client:

{
    formattingTags: ['p', 'h2', 'h3', 'h4']
}

.

Edit:

Just noticed that you already have the button in your toolbar, it's the second one from the left :D

1

I was being thick, as usual. You can add headings using the formatting button, which looks like this:

formatting bar

1
  • It might be that you are thick. But then I'm also thick. Also, my client is thick. None of us spotted this! It'd be great to be able to change this so that it's a little clearer. Mostly, I find that I use H2, H3 and H4. It'd be really nice to be able to promote these to the main bar, without hiding them within a drop-down. Or it could just be us being thick ;-) – ianp Apr 6 '17 at 17:28
1

When you set up a rich text field, you can adjust what options/buttons show up. Looks like you might have "Simple" selected. Choose "Standard" instead for more options or create your own as explained here:

http://straightupcraft.com/articles/how-to-add-custom-redactor-toolbars-to-the-default-rich-text-field-in-craft-cms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.