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
b68463ab
Commit
b68463ab
authored
Feb 22, 2023
by
Яков
Browse files
add tag download for file
parent
b7730eb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/QEditor.jsx
View file @
b68463ab
...
...
@@ -874,8 +874,10 @@ const QEditor = ({ value, onChange = ()=>{}, style, uploadOptions = {url: "", er
break
case
'
file
'
:
uploadedPaths
.
map
((
file
,
i
)
=>
{
let
exp
=
file
.
path
.
split
(
'
.
'
);
exp
=
exp
[
exp
.
length
-
1
]
editor
.
chain
().
focus
()
.
insertContent
(
`<a href="
${
file
.
path
}
" target="_blank" download="
true
" data-size="
${
file
.
size
}
">
${
file
.
name
}
</a>`
).
run
();
.
insertContent
(
`<a href="
${
file
.
path
}
" target="_blank" download="
${
file
.
name
}
.
${
exp
}
" data-size="
${
file
.
size
}
">
${
file
.
name
}
</a>`
).
run
();
});
break
}
...
...
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