Keyboard support in Blazor RichTextEditor Component
6 Feb 202518 minutes to read
The editor has full keyboard accessibility that includes shortcuts to open and other actions with toolbar items, drop-down lists, and dialogs.
HTML editor shortcut keys
You can use the following keyboard shortcuts when the Rich Text Editor is set to EditorMode as HTML
.
Toolbar
The toolbar shortcuts allow quick navigation and interaction with the toolbar elements, including focusing, moving between tools, and executing actions like closing menus and dialogs.
Actions | Windows | Mac |
---|---|---|
Focus on toolbar | Alt + F10 | ⌥ + F10 |
Move to the next tool | → | →, ⌘ + F |
Move to the previous tool | ← | ←, ⌘ + F |
Close dropdowns/menu and dialogs | Esc | Esc |
Execute the currently focused tool action | Enter, Space | Enter, Space |
Content editing and formatting
These keyboard shortcuts allow for quick access to content editing features like bold, italic, and text selection.
Actions | Windows | Mac |
---|---|---|
Select all content | Ctrl + A | ⌘ + A |
Insert a hard line break (a new paragraph) | Enter | Enter |
Insert a soft line break (without starting a new paragraph) | Shift + Enter | ⇧ + Enter |
Make text bold | Ctrl + B | ⌘ + B |
Italicize text | Ctrl + I | ⌘ + I |
Apply strikethrough | Ctrl + Shift + S | ⌘ + ⇧ + S |
Insert inline code | Ctrl + ` | ⌘ + ` |
Create link | Ctrl + K | ⌘ + K |
Copy format painter | Alt + Shift + C | ⌥ + ⌘ + C |
Paste format painter | Alt + Shift + V | ⌥ + ⌘ + V |
Clear the copy format painter | Esc | Esc |
Tab space (when EnableTabKey is enabled) | Tab | Tab |
Inserting
These shortcuts enable you to quickly insert tables, images, audio, and videos into your content.
Actions | Windows | Mac |
---|---|---|
Open the insert table dialog | Ctrl + Shift + E | ⌘ + ⇧ + E |
Open the insert image dialog | Ctrl + Shift + I | ⌘ + ⇧ + I |
Open the insert audio dialog | Ctrl + Shift + A | ⌘ + ⇧ + A |
Open the insert video dialog | Ctrl + Alt + V | ⌘ + ⌥ + V |
Table cell
These shortcuts assist in navigating between table cells and managing table rows easily.
Actions | Windows | Mac |
---|---|---|
Move the selection to the next cell | Tab | Tab |
Move the selection to the previous cell | Shift + Tab | ⇧ + Tab |
Insert a new table row (when in the last cell) | Tab | Tab |
Navigate through the table (using arrow keys) | ↑ , → , ↓ , ← | ↑ , → , ↓ , ← |
Text manipulation
These shortcuts allow you to manipulate text, such as changing case or applying superscript/subscript formatting.
Actions | Windows | Mac |
---|---|---|
Convert text to uppercase | Ctrl + Shift + U | ⌘ + ⇧ + U |
Convert text to lowercase | Ctrl + Shift + L | ⌘ + ⇧ + L |
Apply superscript | Ctrl + Shift + = | ⌘ + ⇧ + = |
Apply subscript | Ctrl + = | ⌘ + = |
Alignment and formatting
These shortcuts help you quickly adjust text alignment and formatting, such as left, center, or right justification.
Actions | Windows | Mac |
---|---|---|
Align text to the center | Ctrl + E | ⌘ + E |
Justify text | Ctrl + J | ⌘ + J |
Align text to the left | Ctrl + L | ⌘ + L |
Align text to the right | Ctrl + R | ⌘ + R |
List and indentation
These shortcuts help with creating and adjusting ordered and unordered lists, and modifying indentations.
Actions | Windows | Mac |
---|---|---|
Increase indent | Ctrl + ] | ⌘ + ] |
Decrease indent | Ctrl + [ | ⌘ + [ |
Create an ordered list | Ctrl + Shift + O | ⌘ + ⇧ + O |
Create an unordered list | Ctrl + Alt + O | ⌘ + ⌥ + O |
Clipboard operations
These shortcuts streamline copying, cutting, pasting, and pasting content as plain text.
Actions | Windows | Mac |
---|---|---|
Copy the selected content | Ctrl + C | ⌘ + C |
Cut the selected content | Ctrl + X | ⌘ + X |
Paste the copied or cut content | Ctrl + V | ⌘ + V |
Paste content as plain text | Ctrl + Shift + V | ⌘ + ⌥ + ⇧ + V |
Undo & redo
These shortcuts allow you to quickly undo and redo changes to your content.
Actions | Windows | Mac |
---|---|---|
Undo | Ctrl + Z | ⌘ + Z |
Redo | Ctrl + Y | ⌘ + Y |
Other actions
These miscellaneous shortcuts help with actions like toggling fullscreen, clearing formatting, and accessing the HTML source.
Actions | PC | Mac |
---|---|---|
View HTML source | Ctrl + Shift + H | ⌘ + ⇧ + H |
Toggle full screen mode | Ctrl + Shift + F | ⌘ + ⇧ + F |
Exit Full screen | Esc | Esc |
Clear all formatting | Ctrl + Shift + R | ⌘ + ⇧ + R |
Markdown editor shortcut keys
You can use the following keyboard shortcuts when the Rich Text Editor is set to EditorMode as Markdown
.
Toolbar
These shortcuts provide quick access to toolbar functions for managing menus and dialogs.
Actions | Windows | Mac |
---|---|---|
Focus on toolbar | Alt + F10 | ⌥ + F10 |
Close dropdowns/menu and dialogs | Esc | Esc |
Content editing and formatting
These shortcuts help in efficiently editing and formatting text content.
Actions | Windows | Mac |
---|---|---|
Select all content | Ctrl + A | ⌘ + A |
Insert a hard line break (a new paragraph) | Enter | Enter |
Make text bold | Ctrl + B | ⌘ + B |
Italicize text | Ctrl + I | ⌘ + I |
Apply strikethrough | Ctrl + Shift + S | ⌘ + ⇧ + S |
Inserting
These shortcuts allow for the quick insertion of tables, links, and images.
Actions | Windows | Mac |
---|---|---|
Open the insert table dialog | Ctrl + Shift + E | ⌘ + ⇧ + E |
Create link | Ctrl + K | ⌘ + K |
Open the insert image dialog | Ctrl + Shift + I | ⌘ + ⇧ + I |
Text manipulation
These shortcuts help in modifying text case and applying superscript or subscript.
Actions | Windows | Mac |
---|---|---|
Convert text to uppercase | Ctrl + Shift + U | ⌘ + ⇧ + U |
Convert text to lowercase | Ctrl + Shift + L | ⌘ + ⇧ + L |
Apply superscript | Ctrl + Shift + = | ⌘ + ⇧ + = |
Apply subscript | Ctrl + = | ⌘ + = |
Lists
These shortcuts enable the creation of ordered and unordered lists.
Actions | Windows | Mac |
---|---|---|
Create an ordered list | Ctrl + Shift + O | ⌘ + ⇧ + O |
Create an unordered list | Ctrl + Alt + O | ⌘ + ⌥ + O |
Clipboard operations
These shortcuts facilitate copying, cutting, and pasting content.
Actions | Windows | Mac |
---|---|---|
Copy the selected content | Ctrl + C | ⌘ + C |
Cut the selected content | Ctrl + X | ⌘ + X |
Paste the copied or cut content | Ctrl + V | ⌘ + V |
Undo & redo
These shortcuts allow for undoing and redoing recent changes.
Actions | Windows | Mac |
---|---|---|
Undo | Ctrl + Z | ⌘ + Z |
Redo | Ctrl + Y | ⌘ + Y |
Other actions
These shortcuts provide additional functionalities like fullscreen mode.
Actions | Windows | Mac |
---|---|---|
Toggle full screen mode | Ctrl + Shift + F | ⌘ + ⇧ + F |
@using Syncfusion.Blazor.RichTextEditor
<SfRichTextEditor EditorMode="EditorMode.Markdown">
<p>The Rich Text Editor component is WYSIWYG ('what you see is what you get') editor that provides the best user experience to create and update the content. Users can format their content using standard toolbar commands.</p>
<p><b> Key features:</b></p>
<ul>
<li><p> Provides <b>IFRAME</b> and <b>DIV</b> modes </p></li>
<li><p> Capable of handling markdown editing.</p></li>
<li><p> Contains a modular library to load the necessary functionality on demand.</p></li>
<li><p> Provides a fully customizable toolbar.</p></li><li><p> Provides HTML view to edit the source directly for developers.</p></li>
<li><p> Supports third - party library integration.</p></li>
<li><p> Allows preview of modified content before saving it.</p></li>
</ul>
</SfRichTextEditor>
Custom key config
Customize the key config for the keyboard interaction of Rich Text Editor, using the KeyConfigure
property.
In the following code block, customize the bold and italic, toolbar actions with ctrl+1
, ctrl+2
respectively.
@using Syncfusion.Blazor.RichTextEditor
<SfRichTextEditor KeyConfigure="@KeyConfig">
<p>The Rich Text Editor component is WYSIWYG ('what you see is what you get') editor that provides the best user experience to create and update the content. Users can format their content using standard toolbar commands.</p>
<p><b> Key features:</b></p>
<ul>
<li><p> Provides <b>IFRAME</b> and <b>DIV</b> modes </p></li>
<li><p> Capable of handling markdown editing.</p></li>
<li><p> Contains a modular library to load the necessary functionality on demand.</p></li>
<li><p> Provides a fully customizable toolbar.</p></li>
<li><p> Provides HTML view to edit the source directly for developers.</p></li>
<li><p> Supports third - party library integration.</p></li>
<li><p> Allows preview of modified content before saving it.</p></li>
</ul>
</SfRichTextEditor>
@code {
private ShortcutKeys KeyConfig = new ShortcutKeys()
{
Bold = "ctrl+1",
Italic = "ctrl+2"
};
}
NOTE
You can refer to our Blazor Rich Text Editor feature tour page for its groundbreaking feature representations. You can also explore our Blazor Rich Text Editor example to know how to render and configure the rich text editor tools.