Skip to content

Commit

Permalink
Update TablePro component to allow table content
Browse files Browse the repository at this point in the history
  • Loading branch information
950288 committed Feb 1, 2024
1 parent 2315e28 commit d2d3051
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions FrontEnd/src/components/TablePro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default Node.create({

group: "block",

content: "paragraph",
content: "paragraph table",

defining: false,

Expand All @@ -59,13 +59,13 @@ export default Node.create({
insertTablePro:
({ rows = 2, cols = 2, withHeaderRow = true } = {}) =>
({ editor, tr }) => {
const table = createTable(editor.schema, rows, cols, withHeaderRow);

const noteNode = editor.schema.nodes.paragraph.createChecked(
{ class: "tableNote" },
[editor.schema.text("add table note here")],
);

const table = createTable(editor.schema, rows, cols, withHeaderRow);

if (!noteNode) {
return false;
}
Expand Down

0 comments on commit d2d3051

Please sign in to comment.