Skip to content

Blockquote Plugin

The BlockquotePlugin adds block quote support with a toggle command, keyboard shortcut, and Markdown-style input rule.

Blockquote in the editor

import { BlockquotePlugin } from '@notectl/core/plugins/blockquote';
new BlockquotePlugin()
interface BlockquoteConfig {
/** Custom locale strings. */
readonly locale?: BlockquoteLocale;
}
CommandDescriptionReturns
toggleBlockquoteToggle blockquote on/off for the current blockboolean
setBlockquoteConvert the current block to blockquoteboolean
editor.executeCommand('toggleBlockquote');
ShortcutAction
Ctrl+Shift+> / Cmd+Shift+>Toggle blockquote
PatternResult
> (at the start of a line)Convert to blockquote
KeyAction
Enter (empty blockquote)Convert blockquote to paragraph
Backspace (at position 0)Convert blockquote to paragraph
ArrowDown (at end of text)Move cursor to next block, or insert a paragraph if last block
ArrowUp (at position 0)Move cursor to previous block
TypeHTML TagDescription
blockquote<blockquote>Block-level quote container

The toDOM method creates a <blockquote> element with the required data-block-id attribute and part="blockquote" for shadow-part targeting. The editor’s default styles render a left border and padding for visual distinction.

The blockquote participates in the three-tier theming cascade. Setting the global --notectl-border still recolors the left bar alongside other borders; the component-scoped tokens override only the blockquote:

notectl-editor {
--notectl-blockquote-border: #6366f1;
--notectl-blockquote-bg: #f5f3ff;
--notectl-blockquote-fg: #4338ca;
}
TokenDefault fallback
--notectl-blockquote-bordervar(--notectl-border)
--notectl-blockquote-bgtransparent
--notectl-blockquote-fginherit

Alternatively, use ::part(blockquote) for structural styling beyond what tokens cover:

notectl-editor::part(blockquote) {
font-style: italic;
border-radius: 4px;
}