fix: Emojis and embeds cannot be copied to plain text clipboard (#3561)

This commit is contained in:
Tom Moor
2022-05-20 09:47:13 -07:00
committed by GitHub
parent 90ca8655af
commit ba7b3fff05
10 changed files with 99 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
import { PlainTextSerializer } from "../editor/types";
import "prosemirror-model";
declare module "prosemirror-model" {
@@ -7,4 +8,11 @@ declare module "prosemirror-model" {
// https://github.com/ProseMirror/prosemirror-model/blob/bd13a2329fda39f1c4d09abd8f0db2032bdc8014/src/replace.js#L51
removeBetween(from: number, to: number): Slice;
}
interface NodeSpec {
/**
* Defines the text representation of the node when copying to clipboard.
*/
toPlainText?: PlainTextSerializer;
}
}