Skip to content
FrameworkJavaScript

Quote block: blockquotes with captions

A blockquote with a left border accent. It supports two sizes, default and large. You switch between them in 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: RichText;                // Quote text as segments (QuoteToolData holds HTML)
  size: 'default' | 'large';    // Text size variant
}
JSON
{
  "id": "qot001",
  "type": "quote",
  "data": {
    "text": [{ "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,
    },
  },
});