Problem in setting different styling for custom table cell for each cell in a selection #6015
Unanswered
martinmolema
asked this question in
Questions & Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I want to change the borders on my table cells. So I use the table, row and cell extensions and created a custom extension for the cells. When applying a new styling using the code below all works well:
The custom cell is defined as below:
SO after a LOT OF tries and learning from 'the net' and the documentation I came to this function below. What I can see in the console-log is e.g.:
Node at depth 0: doc
Node at depth 1: table
Node at depth 2: tableRow
Node at depth 3: tableCell
finding selection dimensions
applying changes 10 steps
However, although the renderHTML() for all cells is being called (I checked using yet more console.logs) the attribute list passed to the renderHTML() attributes only contain the default values (null) and no changes are visible.
Again: when using
this.editor.commands.updateAttributes('tableCell',
works as expected.I have tried many variants of the function below. First I thought there was a problem with the tableCell node, the contents or container node not being used and a lot of other things. However, I cannot seem it to propagate the changes.
Is there some pre-condition I am missing here? Is it not possible to manipulate the selection cell-by-cell?
Any help is greatly appreciated. Been trying this for a few days now.....
Beta Was this translation helpful? Give feedback.
All reactions