Redactor Format Settings For Statamic V2
Posted by Gareth Redfern
Category: statamic
Tags: statamic-v2
Statamic V2 has a redactor fieldtype the same as it did in V1, however the settings are configured slightly differently in V2. To modify the HTML tags that display when the user selects the format button you need to add the format settings in the site/settings/system.yaml
file. Here is an example of what you need to do:
redactor:
-
name: Standard
settings:
buttons:
- formatting
- bold
- italic
- unorderedlist
- orderedlist
- html
formatting:
- p
- h3
-
name: Basic
settings:
buttons:
- bold
- italic
Notice how the formatting option sits separate to the actual formatting buttons option, this is important, if you try to stack it underneath the buttons formatting YAML it will not work:
# this will not work
redactor:
-
name: Standard
settings:
buttons:
- formatting
- p
- h3