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
fe29b121
Commit
fe29b121
authored
May 25, 2026
by
Яков
Browse files
update fix issue
parent
a6d105fb
Changes
4
Hide whitespace changes
Inline
Side-by-side
package.json
View file @
fe29b121
{
{
"name"
:
"react-ag-qeditor"
,
"name"
:
"react-ag-qeditor"
,
"version"
:
"1.1.
69
"
,
"version"
:
"1.1.
70
"
,
"description"
:
"WYSIWYG html editor"
,
"description"
:
"WYSIWYG html editor"
,
"author"
:
"atma"
,
"author"
:
"atma"
,
"license"
:
"
MIT
"
,
"license"
:
"
MIT
"
,
...
...
src/QEditor.jsx
View file @
fe29b121
...
@@ -1672,7 +1672,8 @@ const QEditor = ({
...
@@ -1672,7 +1672,8 @@ const QEditor = ({
img
.
src
=
file
.
path
img
.
src
=
file
.
path
img
.
onload
=
()
=>
{
img
.
onload
=
()
=>
{
const
maxWidth
=
editor
.
view
.
dom
.
clientWidth
-
32
// учёт padding
const
domWidth
=
editor
.
view
.
dom
.
clientWidth
const
maxWidth
=
domWidth
>
0
?
domWidth
-
32
:
img
.
naturalWidth
const
realWidth
=
Math
.
min
(
img
.
naturalWidth
,
maxWidth
)
const
realWidth
=
Math
.
min
(
img
.
naturalWidth
,
maxWidth
)
const
realHeight
=
img
.
naturalHeight
*
(
realWidth
/
img
.
naturalWidth
)
const
realHeight
=
img
.
naturalHeight
*
(
realWidth
/
img
.
naturalWidth
)
...
...
src/extensions/InteractiveImage.js
View file @
fe29b121
...
@@ -717,8 +717,7 @@ export const InteractiveImage = Node.create({
...
@@ -717,8 +717,7 @@ export const InteractiveImage = Node.create({
:
style
.
push
(
'
display: block
'
,
'
margin-left: auto
'
);
:
style
.
push
(
'
display: block
'
,
'
margin-left: auto
'
);
}
}
if
(
width
)
style
.
push
(
`width:
${
width
}
px`
);
if
(
width
)
style
.
push
(
`width:
${
width
}
px`
,
'
max-width: 100%
'
);
if
(
height
)
style
.
push
(
`height:
${
height
}
px`
);
return
[
return
[
'
interactive-image
'
,
'
interactive-image
'
,
...
...
src/index.scss
View file @
fe29b121
...
@@ -918,17 +918,17 @@ body{
...
@@ -918,17 +918,17 @@ body{
}
}
&-list{
&-list{
display:
flex
;
display:
grid
;
flex-wrap: wrap
;
grid-template-columns: repeat(auto-fill, minmax(90px, 1fr))
;
gap: 10px;
gap: 10px;
max-height: 280px;
max-height:
min(
280px
, calc(90dvh - 440px))
;
overflow-y: auto;
overflow-y: auto;
padding-right: 4px;
padding-right: 4px;
}
}
&-item{
&-item{
position: relative;
position: relative;
width: 100
px
;
width: 100
%
;
aspect-ratio: 16 / 9;
aspect-ratio: 16 / 9;
background-color: #e8eaed;
background-color: #e8eaed;
border-radius: 6px;
border-radius: 6px;
...
@@ -965,9 +965,7 @@ body{
...
@@ -965,9 +965,7 @@ body{
&.is-audio,
&.is-audio,
&.is-file{
&.is-file{
aspect-ratio: auto;
aspect-ratio: auto;
width: auto;
width: 100%;
max-width: 160px;
min-width: 80px;
height: auto;
height: auto;
background-image: none !important;
background-image: none !important;
background-color: #F5F7FA;
background-color: #F5F7FA;
...
@@ -977,7 +975,7 @@ body{
...
@@ -977,7 +975,7 @@ body{
}
}
&.is-video{
&.is-video{
width:
240px
;
width:
100%
;
aspect-ratio: 16 / 9;
aspect-ratio: 16 / 9;
background-color: #000;
background-color: #000;
background-image: none !important;
background-image: none !important;
...
...
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