Commit d973bd2b by Яков

test drag and drop

parent b018c90c
...@@ -511,9 +511,9 @@ const QEditor = ({ ...@@ -511,9 +511,9 @@ const QEditor = ({
Audio, Audio,
Superscript, Superscript,
Subscript, Subscript,
// DragAndDrop.configure({ DragAndDrop.configure({
// linkUpload: uploadOptions.url linkUpload: uploadOptions.url
// }), }),
], ],
content: value, content: value,
onUpdate: ({editor}) => onChange(editor.getHTML()), onUpdate: ({editor}) => onChange(editor.getHTML()),
......
...@@ -21,6 +21,10 @@ const DragAndDrop = Extension.create({ ...@@ -21,6 +21,10 @@ const DragAndDrop = Extension.create({
props: { props: {
handleDOMEvents: { handleDOMEvents: {
async paste (view, event) { async paste (view, event) {
console.log(event.clipboardData);
console.log(event.originalEvent.clipboardData);
let items = (event.clipboardData || event.originalEvent.clipboardData).items; let items = (event.clipboardData || event.originalEvent.clipboardData).items;
for (let i = 0; i < items.length; i++){ for (let i = 0; i < items.length; i++){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment