Commands

Feature origin: Tint

Run a command with editor.exec() or show it in the toolbar layout.

Command list

CommandAction
bold, italicToggle inline emphasis.
h1–h6Toggle an ATX heading.
bulletList, orderedList, blockquoteFormat lines as a list or quote. quote aliases blockquote.
code, codeBlockToggle inline or fenced code.
link, imageOpen a URL dialog or insert directly when given a URL. makeLink aliases link.
undo, redoRun 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.