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
3a2fa14f
Commit
3a2fa14f
authored
May 25, 2026
by
Яков
Browse files
update fix issue
parent
84b72d96
Changes
4
Show whitespace changes
Inline
Side-by-side
package.json
View file @
3a2fa14f
{
{
"name"
:
"react-ag-qeditor"
,
"name"
:
"react-ag-qeditor"
,
"version"
:
"1.1.7
2
"
,
"version"
:
"1.1.7
3
"
,
"description"
:
"WYSIWYG html editor"
,
"description"
:
"WYSIWYG html editor"
,
"author"
:
"atma"
,
"author"
:
"atma"
,
"license"
:
"
MIT
"
,
"license"
:
"
MIT
"
,
...
...
src/QEditor.jsx
View file @
3a2fa14f
...
@@ -1050,15 +1050,21 @@ const QEditor = ({
...
@@ -1050,15 +1050,21 @@ const QEditor = ({
onClick
=
{
(
e
)
=>
{
onClick
=
{
(
e
)
=>
{
e
.
stopPropagation
()
e
.
stopPropagation
()
const
el
=
audioRefs
.
current
[
uid
]
const
el
=
audioRefs
.
current
[
uid
]
if
(
!
el
)
return
if
(
!
el
||
!
el
.
src
)
return
if
(
isPlaying
)
{
if
(
isPlaying
)
{
el
.
pause
()
el
.
pause
()
}
else
{
}
else
{
Object
.
entries
(
audioRefs
.
current
).
forEach
(([
key
,
ref
])
=>
{
Object
.
entries
(
audioRefs
.
current
).
forEach
(([
key
,
ref
])
=>
{
if
(
key
!==
uid
&&
ref
)
ref
.
pause
()
if
(
key
!==
uid
&&
ref
&&
!
ref
.
paused
)
ref
.
pause
()
})
})
el
.
play
()
setPlayingAudio
(
uid
)
setPlayingAudio
(
uid
)
const
p
=
el
.
play
()
if
(
p
!==
undefined
)
{
p
.
catch
(
err
=>
{
if
(
err
.
name
!==
'
AbortError
'
)
console
.
warn
(
err
)
setPlayingAudio
(
null
)
})
}
}
}
}
}
}
}
/>
/>
...
...
src/extensions/Video.js
View file @
3a2fa14f
...
@@ -83,9 +83,8 @@ const ResizableVideoView = ({ editor, node, updateAttributes, getPos, selected }
...
@@ -83,9 +83,8 @@ const ResizableVideoView = ({ editor, node, updateAttributes, getPos, selected }
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
!
node
.
attrs
[
'
data-node-id
'
])
{
if
(
!
node
.
attrs
[
'
data-node-id
'
])
{
safeUpdateAttributes
({
const
id
=
`video-
${
Date
.
now
()}
-
${
Math
.
random
().
toString
(
36
).
slice
(
2
,
9
)}
`
'
data-node-id
'
:
`video-
${
Date
.
now
()}
-
${
Math
.
random
().
toString
(
36
).
slice
(
2
,
9
)}
`
,
setTimeout
(()
=>
safeUpdateAttributes
({
'
data-node-id
'
:
id
}),
0
)
})
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
// eslint-disable-next-line react-hooks/exhaustive-deps
},
[
node
.
attrs
[
'
data-node-id
'
]])
},
[
node
.
attrs
[
'
data-node-id
'
]])
...
@@ -98,17 +97,19 @@ const ResizableVideoView = ({ editor, node, updateAttributes, getPos, selected }
...
@@ -98,17 +97,19 @@ const ResizableVideoView = ({ editor, node, updateAttributes, getPos, selected }
return
return
}
}
isInitialized
.
current
=
true
const
{
width
:
editorWidth
}
=
getEditorDimensions
()
const
{
width
:
editorWidth
}
=
getEditorDimensions
()
const
initialWidth
=
Math
.
min
(
editorWidth
,
720
)
const
initialWidth
=
Math
.
min
(
editorWidth
,
720
)
const
initialHeight
=
Math
.
round
((
initialWidth
*
9
)
/
16
)
const
initialHeight
=
Math
.
round
((
initialWidth
*
9
)
/
16
)
setTimeout
(()
=>
{
safeUpdateAttributes
({
safeUpdateAttributes
({
width
:
initialWidth
,
width
:
initialWidth
,
height
:
initialHeight
,
height
:
initialHeight
,
align
:
node
.
attrs
.
align
||
'
left
'
,
align
:
node
.
attrs
.
align
||
'
left
'
,
})
})
},
0
)
isInitialized
.
current
=
true
// eslint-disable-next-line react-hooks/exhaustive-deps
// eslint-disable-next-line react-hooks/exhaustive-deps
},
[
node
.
attrs
.
width
,
node
.
attrs
.
height
])
},
[
node
.
attrs
.
width
,
node
.
attrs
.
height
])
...
...
src/index.scss
View file @
3a2fa14f
...
@@ -967,6 +967,14 @@ body{
...
@@ -967,6 +967,14 @@ body{
}
}
}
}
&.is-audio.selected{
box-shadow: none;
&::after{
display: none;
}
}
&.is-audio{
&.is-audio{
aspect-ratio: auto;
aspect-ratio: auto;
width: 100%;
width: 100%;
...
...
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