$ npm install prosemirror-paste-rules
Better handling of pasted content in the editor.
You want to automatically transform pasted content within your editor into nodes marks, or different text.
prosemirror-paste-rules
allows the transformation of plain text pasted content into marks and nodes.
# 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.
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([])],
});
© 2010 - cnpmjs.org x YWFE | Home | YWFE