prosemirror-paste-link
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

prosemirror-paste-link

ProseMirror plugin handling paste case when:

  • the editor has selected text
  • the pasted text is an URL

In that case a mark with the URL will be added to the selected text, instead of overwriting the selection with the URL text.

Usage

import pasteLinkPlugin from "prosemirror-paste-link";
/*...*/
const state = EditorState.create<typeof imageSchema>({
    /*...*/
    plugins: [
        /*...*/
        pasteLink,
    ],
});

Package Sidebar

Install

npm i prosemirror-paste-link

Weekly Downloads

2

Version

1.0.2

License

ISC

Unpacked Size

3.69 kB

Total Files

5

Last publish

Collaborators

  • viktorvacziee