Skip to content
FrameworkJavaScript

Quote block: blockquotes with captions

A blockquote with a left border accent. Supports two sizes (default and large) switchable via the block settings menu. Pasting a `<blockquote>` element automatically creates a quote block.

Import

TypeScript
import { Quote } from '@bloklabs/core/tools';

Save Data

TypeScript
interface QuoteData {
  text: string;                  // Quote HTML content
  size: 'default' | 'large';    // Text size variant
}
JSON
{
  "id": "qot001",
  "type": "quote",
  "data": {
    "text": "The only way to do great work is to love what you do.",
    "size": "default"
  }
}

Usage Example

TypeScript
import { Blok } from '@bloklabs/core';
import { Quote } from '@bloklabs/core/tools';

const editor = new Blok({
  holder: 'editor',
  tools: {
    quote: {
      class: Quote,
    },
  },
});