Blockquotes

Super Editor ships with support for blockquotes, which are essentially paragraphs whose content represents a quotation.

Blockquotes re-use some tools from the paragraph implementation, and also adds some tools specific to blockquotes.

Blockquote Node

Blockquotes are represented in documents with a ParagraphNode whose blockType is set to blockquoteAttribution.

final document = MutableDocument(nodes: [
  ParagraphNode(
    id: Editor.createNodeId(),
    text: AttributedText("This is a header 1"),
    metadata: {
      NodeMetadata.blockType: blockquoteAttribution,
    }
  ),
]);

Visual Presentation

By default, SuperEditor includes a BlockquoteComponentBuilder, which builds a BlockquoteComponent widget to display within an editor. Therefore, no additional steps are required to display a blockquote.

The easiest way to make stylistic adjustments to the built-in blockquote presentation is to customize Super Editor's default stylesheet.

References