Arkpad
FeaturesTypography

Blockquote

Display quoted text with `toggleBlockquote`.

Type: Node

Blockquote displays quoted text in an indented block. Renders as <blockquote> in HTML output.

Demo

Installation

import { Blockquote } from "@arkpad/extension-blockquote";

Commands

The extension registers three commands for managing blockquotes:

// Toggles the current block between blockquote and a paragraph
editor.runCommand("toggleBlockquote");

// Explicitly wraps the current block inside a blockquote
editor.runCommand("setBlockquote");

// Explicitly unwraps the blockquote back into a standard paragraph
editor.runCommand("unsetBlockquote");

Chaining Commands

You can chain commands to focus the editor after toggling a blockquote:

editor.chain().focus().toggleBlockquote().run();

Keyboard Shortcuts

ShortcutAction
Mod-Shift-bToggles blockquote

Active State

const isActive = editor.isActive("blockquote");

Configuration

Options

NameTypeDefaultDescription
HTMLAttributesRecord<string, any>{}Key-value pairs of attributes to be rendered on the <blockquote> DOM element.
Blockquote.configure({
  HTMLAttributes: {
    class: "custom-quote-styling",
  },
});