Commit dd70d3d0 by Яков

fix drag and drop

parent 4011a958
......@@ -20,11 +20,11 @@ const DragAndDrop = Extension.create({
key: new PluginKey('customDragAndDrop'),
props: {
handleDOMEvents: {
// async paste (view, event) {
//
// console.log(event.clipboardData);
// // console.log(event.originalEvent.clipboardData);
//
async paste (view, event) {
console.log('Clipboard types:', event.clipboardData.types);
console.log('HTML data length:', event.clipboardData.getData('text/html').length);
// let items = (event.clipboardData || event.originalEvent.clipboardData).items;
//
// for (let i = 0; i < items.length; i++){
......@@ -44,7 +44,7 @@ const DragAndDrop = Extension.create({
// const transaction = view.state.tr.replaceSelectionWith(node);
// view.dispatch(transaction)
// }
// },
},
async drop (view, event) {
const hasFiles = event.dataTransfer.files.length > 0;
......
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