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
bd9f8fc8
Commit
bd9f8fc8
authored
Dec 10, 2025
by
Яков
Browse files
add pdf to text
parent
ed18ec99
Changes
3
Show whitespace changes
Inline
Side-by-side
package.json
View file @
bd9f8fc8
{
{
"name"
:
"react-ag-qeditor"
,
"name"
:
"react-ag-qeditor"
,
"version"
:
"1.1.2
0
"
,
"version"
:
"1.1.2
1
"
,
"description"
:
"WYSIWYG html editor"
,
"description"
:
"WYSIWYG html editor"
,
"author"
:
"atma"
,
"author"
:
"atma"
,
"license"
:
"
MIT
"
,
"license"
:
"
MIT
"
,
...
...
src/QEditor.jsx
View file @
bd9f8fc8
...
@@ -641,10 +641,14 @@ const QEditor = ({
...
@@ -641,10 +641,14 @@ const QEditor = ({
accept
=
{
accept
}
accept
=
{
accept
}
action
=
{
custom_url
.
length
>
0
?
custom_url
:
url
}
action
=
{
custom_url
.
length
>
0
?
custom_url
:
url
}
errorMessage
=
{
uploadOptions
.
errorMessage
}
errorMessage
=
{
uploadOptions
.
errorMessage
}
onSuccess
=
{
(
file
)
=>
{
onSuccess
=
{
(
file
,
html
)
=>
{
if
(
typeof
file
!==
"
undefined
"
)
{
const
_uploadedPaths
=
[...
uploadedPaths
]
const
_uploadedPaths
=
[...
uploadedPaths
]
_uploadedPaths
.
push
(
file
)
_uploadedPaths
.
push
(
file
)
setUploadedPaths
(
_uploadedPaths
)
setUploadedPaths
(
_uploadedPaths
)
}
else
{
setEmbedContent
(
html
);
}
}
}
}
}
onDelete
=
{
(
deleteFile
)
=>
{
onDelete
=
{
(
deleteFile
)
=>
{
let
deleteIdx
=
null
let
deleteIdx
=
null
...
...
src/components/Uploader.js
View file @
bd9f8fc8
...
@@ -31,6 +31,7 @@ export default class Uploader extends React.Component {
...
@@ -31,6 +31,7 @@ export default class Uploader extends React.Component {
progress
:
0
,
progress
:
0
,
isUpload
:
false
,
isUpload
:
false
,
isSuccess
:
false
,
isSuccess
:
false
,
html
:
''
}
}
this
.
files
=
{};
this
.
files
=
{};
...
@@ -109,6 +110,9 @@ export default class Uploader extends React.Component {
...
@@ -109,6 +110,9 @@ export default class Uploader extends React.Component {
}
}
return
(
return
(
<
Fragment
>
<
Fragment
>
{
this
.
state
.
html
.
length
>
0
?
<
div
dangerouslySetInnerHTML
=
{{
__html
:
this
.
state
.
html
}}
/
>
:
<>
<
div
className
=
{
'
atma-editor-uploader-uitems
'
}
>
<
div
className
=
{
'
atma-editor-uploader-uitems
'
}
>
{
{
Object
.
keys
(
this
.
state
.
files
).
map
((
uid
,
i
)
=>
(
Object
.
keys
(
this
.
state
.
files
).
map
((
uid
,
i
)
=>
(
...
@@ -183,8 +187,8 @@ export default class Uploader extends React.Component {
...
@@ -183,8 +187,8 @@ export default class Uploader extends React.Component {
});
});
}
}
if
(
resp
.
state
===
'
success
'
)
{
if
(
resp
.
state
===
'
success
'
&&
resp
.
html
)
{
console
.
log
(
resp
);
this
.
setState
({
html
:
resp
.
html
,
uploaderSuccess
:
true
},
()
=>
this
.
onSuccess
(
undefined
,
resp
.
html
))
}
}
}}
}}
onProgress
=
{(
o
,
file
)
=>
{
onProgress
=
{(
o
,
file
)
=>
{
...
@@ -204,6 +208,8 @@ export default class Uploader extends React.Component {
...
@@ -204,6 +208,8 @@ export default class Uploader extends React.Component {
>
>
<
div
className
=
{
'
atma-editor-uploader-placeholder
'
}
>
Нажмите
или
перетащите
файлы
сюда
<
/div
>
<
div
className
=
{
'
atma-editor-uploader-placeholder
'
}
>
Нажмите
или
перетащите
файлы
сюда
<
/div
>
<
/Upload
>
<
/Upload
>
<
/
>
}
<
/Fragment
>
<
/Fragment
>
)
)
...
...
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