Skip to content

Latest commit

 

History

History
62 lines (49 loc) · 991 Bytes

File metadata and controls

62 lines (49 loc) · 991 Bytes

Blockquote plugin

Blockquote is plugin for Yoopta-Editor

Installation

yarn add @yoopta/blockquote

Usage

import Blockquote from '@yoopta/blockquote';

const plugins = [Blockquote];

const Editor = () => {
  return <YooptaEditor plugins={plugins} />;
};

Default classnames

  • .yoopta-blockquote

Default options

const Blockquote = new YooptaPlugin({
  options: {
    display: {
      title: 'Blockquote',
      description: 'Capture quote',
    },
    shortcuts: ['>'],
  },
});

How to extend

const plugins = [
  Blockquote.extend({
    renders: {
      blockquote: (props) => <YourCustomComponent {...props} />
    },
    options: {
      shortcuts: [`<your custom shortcuts>`],
      display: {
        title: `<your custom title>`,
        description: `<your custom description>`,
      },
      HTMLAttributes: {
        className: '<your classname>',
        // ...other HTML attributes
      },
    },
  });
];