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
c1754417
Commit
c1754417
authored
Jan 17, 2024
by
firesong1337
Browse files
img resizing
parent
21b0191c
Changes
2
Show whitespace changes
Inline
Side-by-side
src/QEditor.jsx
View file @
c1754417
...
...
@@ -38,7 +38,6 @@ import IframeModal from './modals/IframeModal'
import
IframeCustomModal
from
'
./modals/IframeCustomModal
'
import
{
isMobile
}
from
'
react-device-detect
'
import
Resizable
from
'
./extensions/Resizing
'
import
{
isChangedAlignment
}
from
'
./extensions/Resizing
'
const
initialBubbleItems
=
[
'
bold
'
,
...
...
@@ -296,8 +295,6 @@ const QEditor = ({
onClick
:
()
=>
{
editor
.
commands
.
setTextAlign
(
'
center
'
)
editor
.
chain
().
focus
()
isChangedAlignment
.
set
(
true
)
}
},
alignRight
:
{
...
...
src/extensions/Resizing.js
View file @
c1754417
import
{
Extension
}
from
"
@tiptap/core
"
;
export
let
isChangedAlignment
=
{
current
:
null
,
get
()
{
return
this
.
current
},
set
(
value
)
{
this
.
current
=
value
}
};
// loads with editor
export
default
Extension
.
create
({
...
...
@@ -136,7 +130,7 @@ export default Extension.create({
if
(
currentPosition
.
x
===
0
)
{
console
.
log
(
"
changed pos
"
);
resizeLayer
.
style
.
display
=
"
none
"
;
//
resizeLayer.style.display = "none";
}
console
.
log
(
entry
.
target
.
parentNode
)
console
.
log
(
"
target:
"
,
entry
.
target
)
...
...
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