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
349b5d41
Commit
349b5d41
authored
Jan 17, 2024
by
yakoff94
Browse files
fix bug chrome
parent
eed38480
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/QEditor.jsx
View file @
349b5d41
...
@@ -282,22 +282,37 @@ const QEditor = ({
...
@@ -282,22 +282,37 @@ const QEditor = ({
alignLeft
:
{
alignLeft
:
{
title
:
'
По левому краю
'
,
title
:
'
По левому краю
'
,
onClick
:
()
=>
{
onClick
:
()
=>
{
editor
.
commands
.
setTextAlign
(
'
left
'
)
editor
.
commands
.
setTextAlign
(
'
left
'
);
editor
.
chain
().
focus
()
//так надо, даже не вникай, фикс бага в хроме
setTimeout
(()
=>
{
editor
.
commands
.
setTextAlign
(
'
left
'
);
editor
.
chain
().
focus
().
run
()
},
150
)
}
}
},
},
alignCenter
:
{
alignCenter
:
{
title
:
'
По центру
'
,
title
:
'
По центру
'
,
onClick
:
()
=>
{
onClick
:
()
=>
{
editor
.
commands
.
setTextAlign
(
'
center
'
);
editor
.
commands
.
setTextAlign
(
'
center
'
);
editor
.
chain
().
focus
();
//так надо, даже не вникай, фикс бага в хроме
setTimeout
(()
=>
{
editor
.
commands
.
setTextAlign
(
'
center
'
);
editor
.
chain
().
focus
().
run
()
},
150
)
}
}
},
},
alignRight
:
{
alignRight
:
{
title
:
'
По правому краю
'
,
title
:
'
По правому краю
'
,
onClick
:
()
=>
{
onClick
:
()
=>
{
editor
.
commands
.
setTextAlign
(
'
right
'
)
editor
.
commands
.
setTextAlign
(
'
right
'
);
editor
.
chain
().
focus
()
//так надо, даже не вникай, фикс бага в хроме
setTimeout
(()
=>
{
editor
.
commands
.
setTextAlign
(
'
right
'
);
editor
.
chain
().
focus
().
run
()
},
150
)
}
}
},
},
insertTable
:
{
insertTable
:
{
...
...
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