Skip to content

Instantly share code, notes, and snippets.

@mike-moreau
Last active June 9, 2025 14:47
Show Gist options
  • Save mike-moreau/2675ee4c4c14bd839216d6f77ee3875b to your computer and use it in GitHub Desktop.
Save mike-moreau/2675ee4c4c14bd839216d6f77ee3875b to your computer and use it in GitHub Desktop.
Baseline Craft 5 CKEditor Field JSON Config
{
"htmlSupport": {
"allow": [
{
"attributes": true,
"classes": [
"button",
"button-primary"
],
"name": "a"
}
]
},
"alignment": {
"options": [
"left",
"right",
"center"
]
},
"list": {
"properties": {
"reversed": false,
"startIndex": false,
"styles": false
}
},
"link": {
"addTargetToExternalLinks": false,
"decorators": {
"openInNewTab": {
"attributes": {
"rel": "noopener noreferrer",
"target": "_blank"
},
"label": "Open in a new tab",
"mode": "manual"
}
}
}
}
@mike-moreau
Copy link
Author

Here's a good article on configuration compared to redactor. Updated the example to include the links in a new tab option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment