Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
react-ag-qeditor
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lib
react-ag-qeditor
Commits
dd70d3d0
Commit
dd70d3d0
authored
Jun 27, 2025
by
Яков
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix drag and drop
parent
4011a958
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
DragAndDrop.js
src/extensions/DragAndDrop.js
+6
-6
No files found.
src/extensions/DragAndDrop.js
View file @
dd70d3d0
...
@@ -20,11 +20,11 @@ const DragAndDrop = Extension.create({
...
@@ -20,11 +20,11 @@ const DragAndDrop = Extension.create({
key
:
new
PluginKey
(
'customDragAndDrop'
),
key
:
new
PluginKey
(
'customDragAndDrop'
),
props
:
{
props
:
{
handleDOMEvents
:
{
handleDOMEvents
:
{
//
async paste (view, event) {
async
paste
(
view
,
event
)
{
//
// console.log(event.clipboardData
);
console
.
log
(
'Clipboard types:'
,
event
.
clipboardData
.
types
);
// // console.log(event.originalEvent.clipboardData
);
console
.
log
(
'HTML data length:'
,
event
.
clipboardData
.
getData
(
'text/html'
).
length
);
//
// 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++){
...
@@ -44,7 +44,7 @@ const DragAndDrop = Extension.create({
...
@@ -44,7 +44,7 @@ const DragAndDrop = Extension.create({
// const transaction = view.state.tr.replaceSelectionWith(node);
// const transaction = view.state.tr.replaceSelectionWith(node);
// view.dispatch(transaction)
// view.dispatch(transaction)
// }
// }
//
},
},
async
drop
(
view
,
event
)
{
async
drop
(
view
,
event
)
{
const
hasFiles
=
event
.
dataTransfer
.
files
.
length
>
0
;
const
hasFiles
=
event
.
dataTransfer
.
files
.
length
>
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment