@yoopta/callout
TypeScript icon, indicating that this package has built-in type declarations

4.7.1-rc.8 • Public • Published

Callout plugin

Callout is plugin for Yoopta-Editor

Installation

yarn add @yoopta/callout

Usage

import Callout from '@yoopta/callout';

const plugins = [Callout];

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

Default classnames

  • .yoopta-callout
  • .yoopta-callout-theme-['default' | 'success' | 'warning' | 'error' | 'info']

Default options

const Callout = new YooptaPlugin({
  options: {
    display: {
      title: 'Callout',
      description: 'Make writing stand out',
    },
    shortcuts: ['<'],
  },
});

How to extend

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

Readme

Keywords

none

Package Sidebar

Install

npm i @yoopta/callout

Weekly Downloads

1,508

Version

4.7.1-rc.8

License

MIT

Unpacked Size

20.5 kB

Total Files

18

Last publish

Collaborators

  • dargo05