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
83a6d913
Commit
83a6d913
authored
Sep 12, 2022
by
Sergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e6bf3b87
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
12 deletions
+0
-12
DragAndDrop.js
src/extensions/DragAndDrop.js
+0
-12
No files found.
src/extensions/DragAndDrop.js
View file @
83a6d913
...
...
@@ -2,18 +2,6 @@ import { Extension } from "@tiptap/core";
import
{
Plugin
,
PluginKey
}
from
'prosemirror-state'
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
)
=>
{
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