Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
lib
react-ag-qeditor
Commits
88e590d1
Commit
88e590d1
authored
May 22, 2026
by
Яков
Browse files
update fix issue
parent
5b8e6efe
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
package.json
View file @
88e590d1
{
{
"name"
:
"react-ag-qeditor"
,
"name"
:
"react-ag-qeditor"
,
"version"
:
"1.1.
59
"
,
"version"
:
"1.1.
60
"
,
"description"
:
"WYSIWYG html editor"
,
"description"
:
"WYSIWYG html editor"
,
"author"
:
"atma"
,
"author"
:
"atma"
,
"license"
:
"
MIT
"
,
"license"
:
"
MIT
"
,
...
...
src/extensions/DragAndDrop.js
View file @
88e590d1
...
@@ -137,6 +137,13 @@ export const DragAndDrop = Extension.create({
...
@@ -137,6 +137,13 @@ export const DragAndDrop = Extension.create({
if
(
!
result
?.
file_path
)
throw
new
Error
(
'
Invalid response from server
'
);
if
(
!
result
?.
file_path
)
throw
new
Error
(
'
Invalid response from server
'
);
// Регистрируем файл так же, как это делает Uploader.js
axios
.
post
(
'
/api/web/ru/set-file-data/
'
,
{
...
result
,
pathname
:
window
.
location
.
pathname
,
slug
:
'
redactor
'
},
{
withCredentials
:
true
}).
catch
(()
=>
{});
const
id
=
`img-
${
Date
.
now
()}
-
${
Math
.
random
().
toString
(
36
).
substr
(
2
,
9
)}
`
;
const
id
=
`img-
${
Date
.
now
()}
-
${
Math
.
random
().
toString
(
36
).
substr
(
2
,
9
)}
`
;
if
(
nodeType
===
'
image
'
)
{
if
(
nodeType
===
'
image
'
)
{
...
@@ -272,6 +279,12 @@ export const DragAndDrop = Extension.create({
...
@@ -272,6 +279,12 @@ export const DragAndDrop = Extension.create({
const
ext
=
blob
.
type
.
split
(
'
/
'
)[
1
]?.
split
(
'
+
'
)[
0
]
||
'
png
'
;
const
ext
=
blob
.
type
.
split
(
'
/
'
)[
1
]?.
split
(
'
+
'
)[
0
]
||
'
png
'
;
const
result
=
await
uploadBlob
(
blob
,
`pasted-image.
${
ext
}
`
);
const
result
=
await
uploadBlob
(
blob
,
`pasted-image.
${
ext
}
`
);
if
(
!
result
?.
file_path
)
return
null
;
if
(
!
result
?.
file_path
)
return
null
;
// Регистрируем файл
axios
.
post
(
'
/api/web/ru/set-file-data/
'
,
{
...
result
,
pathname
:
window
.
location
.
pathname
,
slug
:
'
redactor
'
},
{
withCredentials
:
true
}).
catch
(()
=>
{});
return
{
filePath
:
result
.
file_path
,
width
,
height
,
style
};
return
{
filePath
:
result
.
file_path
,
width
,
height
,
style
};
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
warn
(
'
[DragAndDrop] не удалось загрузить:
'
,
src
?.
slice
(
0
,
80
),
e
);
console
.
warn
(
'
[DragAndDrop] не удалось загрузить:
'
,
src
?.
slice
(
0
,
80
),
e
);
...
...
src/extensions/InteractiveImage.js
View file @
88e590d1
This diff is collapsed.
Click to expand it.
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