SetCellAttr in prosemirror-tables needs parameters (#883)

* SetCellAttr in prosemirror-tables needs parameters

The `setCellAttr` command has no use if we can't pass parameters to it. My issue was setting the background color of a cell in a table.
See issue https://github.com/ueberdosis/tiptap/issues/862.

* Fix spaces in function parameters

`A space is required after '{' `
This commit is contained in:
Drabble 2020-12-29 10:13:29 +01:00 committed by GitHub
parent f1fbee9da7
commit dea48bcff8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,7 @@ export default class Table extends Node {
toggleHeaderColumn: () => toggleHeaderColumn,
toggleHeaderRow: () => toggleHeaderRow,
toggleHeaderCell: () => toggleHeaderCell,
setCellAttr: () => setCellAttr,
setCellAttr: ({ name, value }) => setCellAttr(name, value),
fixTables: () => fixTables,
}
}