Docs › Text and paragraphs
Alignment and indent
Left, center, right and justify, the align menu, indent and outdent.
Center or right-align paragraphs and add or remove space in front of them. Alignment applies to whole paragraphs, not to words.
Try it
A centered title line
Right-aligned: October 2026
Indented one step (40px).
Paragraphs without alignment sit on the left.
Code for this demo
createEditor('#editor', {
toolbar: 'alignMenu | alignLeft alignCenter alignRight alignJustify | indent outdent',
});Alignment
| Toolbar name | Action | Shortcut |
|---|---|---|
alignLeft | Align left (removes alignment) | Ctrl+Shift+L |
alignCenter | Center | Ctrl+Shift+E |
alignRight | Align right | Ctrl+Shift+R |
alignJustify | Justify | Ctrl+Shift+J |
alignMenu | All four in one menu button | — |
alignCenterToggle | One button that switches center and left | — |
With an image selected, left, center and right align the image instead of the paragraph (Images).
Indent and outdent
indent/outdent, shortcuts Ctrl+] / Ctrl+[- Normal paragraphs get 40px more or less left margin per step.
- In a list, the item moves into or out of a nested list. Tab / Shift+Tab do the same in lists.
- Table cells are not indented.
Presets and phones
board(default) andbasic:alignMenuon the first row; inboard, indent and outdent are under ⋯ morefull: four align buttons plus indent and outdent on the first row- The phone toolbar shows a single
alignCenterTogglebutton to save room.
Saved HTML
<p style="text-align: center">Centered</p>
<p style="text-align: right">Right</p>
<p style="margin-left: 40px">Indented</p>API
editor.exec('alignCenter');
editor.exec('align', 'justify'); // what the menu runs: left | center | right | justify
editor.exec('indent');Options
| Name | Type | Default | Description |
|---|---|---|---|
alignLeft alignCenter alignRight alignJustify | toolbar item | — | Align buttons |
alignMenu | toolbar item | — | Align menu (one button) |
alignCenterToggle | toolbar item | — | Toggle centering |
indent outdent | toolbar item | — | Indent, outdent |