mirror of https://github.com/fantasticit/think.git
close #186
This commit is contained in:
parent
942206b33a
commit
4f8549b8ba
|
@ -73,7 +73,10 @@ export const COMMANDS: ICommand[] = [
|
||||||
onSelect={({ rows, cols }) => {
|
onSelect={({ rows, cols }) => {
|
||||||
return runCommand({
|
return runCommand({
|
||||||
label: '表格',
|
label: '表格',
|
||||||
action: () => editor.chain().focus().insertTable({ rows, cols, withHeaderRow: true }).run(),
|
action: () => {
|
||||||
|
editor.chain().focus().run();
|
||||||
|
editor.chain().insertTable({ rows, cols, withHeaderRow: true }).focus().run();
|
||||||
|
},
|
||||||
})();
|
})();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -105,7 +108,10 @@ export const COMMANDS: ICommand[] = [
|
||||||
onSelect={({ cols }) => {
|
onSelect={({ cols }) => {
|
||||||
return runCommand({
|
return runCommand({
|
||||||
label: '布局',
|
label: '布局',
|
||||||
action: () => editor.chain().focus().setColumns({ type: 'left-right', columns: cols }).run(),
|
action: () => {
|
||||||
|
editor.chain().focus().run();
|
||||||
|
editor.chain().setColumns({ type: 'left-right', columns: cols }).focus().run();
|
||||||
|
},
|
||||||
})();
|
})();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue