Skip to content

Basic formatting

The core editor supports bold, italic, underline, inline code, strikethrough, ==highlight==, and super and subscript. These plugins add document structure:

import {
headingsPlugin,
listsPlugin,
quotePlugin,
thematicBreakPlugin
} from '@the-sumeet/sveltedown';
const plugins = [headingsPlugin(), listsPlugin(), quotePlugin(), thematicBreakPlugin()];
Plugin Adds
headingsPlugin({ allowedHeadingLevels? }) # to ###### headings. allowedHeadingLevels limits the levels in the block type select and the shortcuts.
quotePlugin() Block quotes.
listsPlugin() Bulleted, numbered and check lists, nested with Tab and Shift+Tab at the start of an item.
thematicBreakPlugin() Horizontal rules.
Shortcut Action
Ctrl/Cmd+B, I, U Bold, italic, underline
Ctrl/Cmd+Alt+1 to 6 Heading of that level (needs headingsPlugin)
Ctrl/Cmd+Alt+0 Paragraph
Ctrl/Cmd+K Link dialog (needs linkDialogPlugin)
Ctrl/Cmd+Z, Ctrl/Cmd+Shift+Z or Ctrl+Y Undo, redo
Tab, Shift+Tab Nest or un-nest a list item, at its start

For typing Markdown syntax, see Markdown shortcuts.