Socket
Socket
Sign inDemoInstall

@remirror/extension-callout

Package Overview
Dependencies
233
Maintainers
2
Versions
236
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @remirror/extension-callout

Add callouts to your text editor.


Version published
Maintainers
2
Install size
19.8 MB
Created

Readme

Source

@remirror/extension-callout

Add callouts to your text editor.

Version Weekly Downloads Bundled size Typed Codebase MIT License

Installation

# yarn
yarn add @remirror/extension-callout

# pnpm
pnpm add @remirror/extension-callout

# npm
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: '💡' })];

/**
 *  If you want to update the emoji to a new one,
 * you can dispatch a transaction to update the `emoji` attrs inside this function.
 */
const renderEmoji = (node: ProsemirrorNode) => {
  const emoji = document.createElement('span');
  emoji.textContent = node.attrs.emoji;
  return emoji;
};

Keywords

FAQs

Last updated on 03 Jul 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc