This commit is contained in:
Philipp Kühn
2021-04-07 22:09:46 +02:00
parent a0e2a830d7
commit 7877fbcb11
2 changed files with 11 additions and 11 deletions

View File

@@ -38,17 +38,17 @@ export const ClipboardTextSerializer = Extension.create({
addProseMirrorPlugins() { addProseMirrorPlugins() {
return [ return [
new Plugin({ // new Plugin({
key: new PluginKey('clipboardTextSerializer'), // key: new PluginKey('clipboardTextSerializer'),
props: { // props: {
clipboardTextSerializer: () => { // clipboardTextSerializer: () => {
const { editor } = this // const { editor } = this
const { from, to } = editor.state.selection // const { from, to } = editor.state.selection
return textBetween(editor, from, to, '\n') // return textBetween(editor, from, to, '\n')
}, // },
}, // },
}), // }),
] ]
}, },
}) })

View File

@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react' import React from 'react'
import { import {
NodeView, NodeView,
NodeViewProps, NodeViewProps,