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
83a6d913
Commit
83a6d913
authored
Sep 12, 2022
by
Sergey
Browse files
fix
parent
e6bf3b87
Changes
1
Show whitespace changes
Inline
Side-by-side
src/extensions/DragAndDrop.js
View file @
83a6d913
...
@@ -2,18 +2,6 @@ import { Extension } from "@tiptap/core";
...
@@ -2,18 +2,6 @@ import { Extension } from "@tiptap/core";
import
{
Plugin
,
PluginKey
}
from
'
prosemirror-state
'
import
{
Plugin
,
PluginKey
}
from
'
prosemirror-state
'
import
axios
from
'
axios
'
import
axios
from
'
axios
'
function
dataURItoBlob
(
dataURI
)
{
let
mimeString
=
dataURI
.
split
(
'
,
'
)[
0
].
split
(
'
:
'
)[
1
].
split
(
'
;
'
)[
0
];
// тип пантомимы
let
byteString
=
atob
(
dataURI
.
split
(
'
,
'
)[
1
]);
// декодирование base64
let
arrayBuffer
=
new
ArrayBuffer
(
byteString
.
length
);
// Создаем буферный массив
let
intArray
=
new
Uint8Array
(
arrayBuffer
);
// Создаем представление
for
(
var
i
=
0
;
i
<
byteString
.
length
;
i
++
)
{
intArray
[
i
]
=
byteString
.
charCodeAt
(
i
);
}
return
new
Blob
([
intArray
],
{
type
:
mimeString
});
}
const
upload
=
async
(
file
)
=>
{
const
upload
=
async
(
file
)
=>
{
let
formData
=
new
FormData
();
let
formData
=
new
FormData
();
...
...
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