Making cells as non editable inside table + center text #5054
Unanswered
Othman-dev
asked this question in
Q&A
Replies: 1 comment
-
|
Fixed centerering text inside cells simple |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
As the title says, I previously used a decorator node to recreate table but I would like to keep the workflow of the actual table inside lexical.
So I create a regular
TableNodeand feel it up withTableCellNodeandTableRowNodeand insert my table inside my lexical editor usinginitialconfig = { editorState: root(with table appended to it), ... }is there a way at this point to make some cells non editable, I believe cells are not editors, as I made them when using decorator node ? When using decorator nodes, I would insert Lexicaleditor as cells so it was easy marking them as non editable, but now I am only using nodes, so I was expecting something like
TableCellNode.setEditable = falseor maybesetMode()Bonus: same goes for centering text inside cells, I can make it happen with toolbar but I would like to be able to do it before rendering to clients. But
TableCellNode.setStyle('text-align: center')or even doing the same on TextNode (inside cell) won't work ?If I TableCellNode.setDirection(), it seems I can only send 'ltr', 'rtl', null ; but no center parameters ?
So if any one as a solution or can point me to what I am missing, I will be thankfull.
Beta Was this translation helpful? Give feedback.
All reactions