Customize the rich text editor toolbar
In Sitecore AI, the rich text editor (RTE) toolbar, powered by CKEditor, comes with a fixed set of features by default. You can configure the toolbar for editors by defining profiles and assigning them to SitecoreAI sites. These profiles determine which editor tools are available to content authors and how they are organized: for each profile, you can remove or reorder the items in the toolbar, but you can't introduce new features or change the JSON schema shape of the toolbar items or groups.
Understanding the Editor profile API
You can create a new profile, with its own RTE toolbar configuration, using the Editor profile API. When creating a new toolbar profile, the toolbar item names and JSON structure must adhere to the supported configuration.
Editor profiles are stored as JSON objects with two required fields:
-
name - specifies the profile name for the Editor toolbar.
-
value - contains the JSON configuration for the toolbar items and grouping (as a JSON-stringified Editor config object).
When stored in a profile, this configuration must be JSON-stringified inside the value property, for example:
{
"name": "Basic Editing",
"value": "{\"toolbar\":{\"items\":[\"bold\",\"italic\",\"underline\",\"link\",\"bulletedList\",\"numberedList\"]}}"
}When you customize the value array:
-
You can remove any items from the items array.
-
You can reorder items (including groups and pipe character | separators).
To ensure compatibility with SitecoreAI:
-
Do not add new toolbar item names. Only the item IDs listed in the Available toolbar items tables are valid. Any additional or custom names will be rejected.
-
Do not change the JSON schema structure of toolbar items or grouped objects. You may not introduce new properties or alter the expected object shape.
-
Do not rename existing toolbar items. Names must match exactly (case-sensitive) the items listed in the Available toolbar items tables.
-
Do not introduce custom plugin identifiers unless provided by Sitecore.
In SitecoreAI, rich text editor toolbar profiles are applied at the site level, not per field. Unlike in XM/XP, assigning an editor profile in the Source field of a rich text field definition is not supported and has no effect. All rich text fields within a site use the toolbar profile assigned to that site.
Available toolbar items
The following toolbar items can be edited to the RTE:
Text formatting
|
Item ID |
Description |
|---|---|
|
bold |
Bold text |
|
italic |
Italic text |
|
emphasis |
Custom emphasis style |
|
underline |
Underline text |
|
strikethrough |
Strikethrough text |
|
subscript |
Subscript formatting |
|
superscript |
Superscript formatting |
|
removeFormat |
Clear all formating |
Color controls
|
Item ID |
Description |
|---|---|
|
fontColor |
Text color picker |
|
fontBackgroundColor |
Highlight color |
Structure
|
Item ID |
Description |
|---|---|
|
heading |
Heading dropdown (H1–H6, paragraph) |
|
alignment |
Align left, center, right, justify |
|
blockQuote |
Block quotation |
Lists & Indentation
|
Item ID |
Description |
|---|---|
|
bulletedList |
Unordered list |
|
numberedList |
Ordered list |
|
indent |
Increase indent |
|
outdent |
Decrease indent |
Links
|
Item ID |
Description |
|---|---|
|
link |
External hyperlink |
|
internalLink |
Internal Sitecore item link |
|
phoneLink |
Phone number link |
Media & Tables
|
Item ID |
Description |
|---|---|
|
sitecoreSelectMedia |
Insert media library item |
|
insertTable |
Insert table |
|
horizontalLine |
Insert horizontal rule |
Advanced features
|
Item ID |
Description |
|---|---|
|
sourceEditing |
Raw HTML source editor |
|
sitecoreResetFieldValue |
Clear value |
Grouped items
Grouped dropdown menus take the following form:
{
"group": "formatting",
"label": "Formatting",
"icon": "text",
"items": ["strikethrough", "subscript", "superscript", "removeFormat"]
}In the above code sample:
-
group is the Unique identifier.
-
label is the dropdown display name.
-
icon is the icon identifier.
-
items is the list of included toolbar items IDs.
The following table lists the predefined groups of the toolbar:
|
Group ID |
Label |
Icon |
Items |
|---|---|---|---|
|
formatting |
Formatting |
text |
strikethrough, subscript, superscript, removeFormat |
|
insert |
Insert |
plus |
horizonSelectMedia, insertTable, horizontalLine |
Example profiles
Here are examples of JSON configuration for SitecoreAI RTE toolbar profiles.
Minimal profile
{
"name": "Minimal",
"value": "{\"toolbar\":{\"items\":[\"bold\",\"italic\",\"link\"] }}"
}Marketer profile
{
"name": "Marketing",
"value": "{\"toolbar\":{\"items\":[\"bold\",\"italic\",\"underline\",\"|\",
\"heading\",\"|\",\"bulletedList\",\"numberedList\",\"|\",\"link\"
,\"internalLink\",\"|\",\"horizonSelectMedia\"}}"
}Full toolbar profile with custom styles
{
"name": "Full with Custom Styles",
"value": "{\"toolbar\":{\"items\":[\"bold\",\"italic\",\"emphasis\",\"underline\",\"style\",\"blockQuote\",{\"group\":\"formatting\",\"label\":\"Formatting\",\"icon\":\"text\",\"items\":[\"strikethrough\",\"subscript\",\"superscript\",\"|\",\"removeFormat\"]},\"fontColor\",\"fontBackgroundColor\",\"|\",\"heading\",\"|\",\"alignment\",\"bulletedList\",\"numberedList\",\"|\",\"outdent\",\"indent\",\"|\",\"link\",\"internalLink\",\"phoneLink\",\"|\",{\"group\":\"insert\",\"label\":\"Insert\",\"withText\":false,\"icon\":\"plus\",\"items\":[\"sitecoreSelectMedia\",\"insertTable\",\"horizontalLine\"]},\"|\",\"sourceEditing\",\"|\",\"sitecoreResetFieldValue\"]},\"style\":{\"definitions\":[{\"name\":\"Article category\",\"element\":\"h3\",\"classes\":[\"category\"]},{\"name\":\"Info box\",\"element\":\"p\",\"classes\":[\"info-box\"]}]}}"
}