Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prosemirror-paste-rules

Package Overview
Dependencies
Maintainers
1
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-paste-rules

Better handling of pasted content in your prosemirror editor.

  • 2.0.0-beta.11
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
42K
increased by7.68%
Maintainers
1
Weekly downloads
 
Created
Source

prosemirror-paste-rules

Better handling of pasted content in the editor.

Version Weekly Downloads Bundled size Typed Codebase MIT License


The problem

You want to automatically transform pasted content within your editor into nodes marks, or different text.

This solution

prosemirror-paste-rules allows the transformation of plain text pasted content into marks and nodes.


Installation

# yarn
yarn add prosemirror-paste-rules prosemirror-view prosemirror-state prosemirror-keymap

# pnpm
pnpm add prosemirror-paste-rules prosemirror-view prosemirror-state prosemirror-keymap

# npm
npm install prosemirror-paste-rules prosemirror-view prosemirror-state prosemirror-keymap

The installation requires the installation of the peer dependencies prosemirror-view, prosemirror-state and prosemirror-model to avoid version clashes.


Getting Started

import { paste } from 'prosemirror-paste-rules';
import { schema } from 'prosemirror-schema-basic';

// Include the plugin in the created editor state.
const state = EditorState.create({
  schema,
  plugins: [paste([])],
});

FAQs

Package last updated on 20 Jul 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc