Commands
Feature origin: Tint
Run a command with editor.exec() or show it in the toolbar layout.
Command list
| Command | Action |
|---|---|
bold, italic | Toggle inline emphasis. |
h1–h6 | Toggle an ATX heading. |
bulletList, orderedList, blockquote | Format lines as a list or quote. quote aliases blockquote. |
code, codeBlock | Toggle inline or fenced code. |
link, image | Open a URL dialog or insert directly when given a URL. makeLink aliases link. |
undo, redo | Run browser-native undo or redo. |
Running commands
editor.exec("bold");
editor.exec("makeLink", "https://example.com");
editor.insertImage("/photo.jpg", "A caption for the photo");Links allow HTTP(S), relative URLs, and mailto:. Images allow HTTP(S) and relative URLs.
Keyboard shortcuts
From the textarea, use Ctrl/⌘ with B, I, or K for Bold, Italic, and Link. Use the arrow keys to navigate toolbar buttons.