Commit 349b5d41 by yakoff94

fix bug chrome

parent eed38480
...@@ -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: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment