@remirror/extension-callout
Add callouts to your text editor.
Installation
yarn add @remirror/extension-callout
pnpm add @remirror/extension-callout
npm install @remirror/extension-callout
Usage
The following code creates an instance of this extension.
import { CalloutExtension } from '@remirror/extension-callout';
const extension = new CalloutExtension();
To render a emoji at the front.
import { CalloutExtension } from '@remirror/extension-callout';
const basicExtensions = () => [new CalloutExtension({ renderEmoji, defaultEmoji: '💡' })];
const renderEmoji = (node: ProsemirrorNode) => {
const emoji = document.createElement('span');
emoji.textContent = node.attrs.emoji;
return emoji;
};