Skip to content
Snippets Groups Projects
Commit 5080ebda authored by chris's avatar chris
Browse files

fix table caption

parent 0798f9b8
No related branches found
No related tags found
1 merge request!488Tables caption
......@@ -96,8 +96,11 @@ const createTable = (colsRows, state, dispatch) => {
rows.push(state.config.schema.nodes.table_row.createAndFill(null, cells));
}
const table = state.config.schema.nodes.table.createAndFill(null, rows);
dispatch(state.tr.replaceSelectionWith(table));
const tableBody = state.config.schema.nodes.table_body.createAndFill(
null,
rows,
);
dispatch(state.tr.replaceSelectionWith(tableBody));
};
const createLink = (state, dispatch) => {
......
......@@ -76,6 +76,8 @@ const TableDropDown = ({ item }) => {
{ label: 'Toggle header column', value: 'toggleHeaderColumn' },
{ label: 'Toggle header row', value: 'toggleHeaderRow' },
{ label: 'Toggle header cells', value: 'toggleHeaderCell' },
{ label: 'Add Caption', value: 'addCaption' },
{ label: 'Delete Caption', value: 'deleteCaption' },
];
const { activeView } = useContext(WaxContext);
......
......@@ -12,6 +12,12 @@
width: 100%;
}
table>caption {
background-color: #535E76;
color: white;
font-weight: bold;
}
th,
td {
border: 1px solid #eee;
......
This diff is collapsed.
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