Skip to content
Snippets Groups Projects
Commit 853cc396 authored by chris's avatar chris
Browse files

use item run

parent 887be427
No related branches found
No related tags found
1 merge request!161Connect ui
......@@ -3,7 +3,6 @@ import React, { useState, useContext } from 'react';
import styled from 'styled-components';
import { ButtonStyles } from 'wax-prosemirror-themes';
import { WaxContext } from 'wax-prosemirror-core';
import { Commands } from 'wax-prosemirror-utilities';
import InsertTableTool from '../../ui/tables/InsertTableTool';
const ButtonStyled = styled.button`
......@@ -60,7 +59,7 @@ const CreateTable = ({ view = {}, item }) => {
<InsertTableToolContainer>
<InsertTableTool
onGridSelect={colRows => {
return Commands.createTable(colRows, state, dispatch);
item.run(colRows, state, dispatch);
}}
/>
</InsertTableToolContainer>
......
......@@ -15,7 +15,9 @@ class Table extends Tools {
name = 'Table';
get run() {
return (state, dispatch) => {};
return (colRows, state, dispatch) => {
Commands.createTable(colRows, state, dispatch);
};
}
select = (state, activeViewId) => {
......
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