I'm having trouble getting Craft 3 to apply the custom classes that I've created in my Standard.json file. I have set up the Redactor config in the Craft CP to use Standard.
My Standard.json file looks like this:
{
"buttons": ["formatting", "bold", "italic", "unorderedlist", "orderedlist",
"link", "image", "video"],
"plugins": ["fullscreen", "video"],
"toolbarFixed": true,
"formattingAdd": {
"article-para": {
"title": "Article Paragraph",
"args": [
"p",
"class",
"para"
]
},
"article-heading": {
"title": "Article Heading",
"args": [
"h3",
"class",
"h2 txt-black mb"
]
}
}
}
Both Article Heading and Article Paragraph show up in my dropdown of formats, but when I select them, the elements don't change visually or in my inspector.
Any help would be appreciated.
Your json formatting appears to be off at the point that you set the args. Try this:
That should do it.