wp.blockEditor.RichText multiline prop is deprecated since version 6.1 and will be removed in version 6.3. Please use nested blocks (InnerBlocks) instead. #51475
Unanswered
alexmitylite
asked this question in
Q&A
Replies: 1 comment
-
This is from the docs on
The only way it can be done is by nesting more blocks that each support inner blocks. So in the case of your table block it seems you'll have to make a “cell” block. The block structure would look like:
So that's the idea but it’s easier said than done in this case. It’ll make it tricky to create the underlying row structuring around the cell blocks. I think it'd require |
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
-
I've built a custom table block, I need to be able to either have richtext, images, or an unordered list in a cell. This is all working great and then I noticed that console warning that multiline is being deprecated. My code currently looks like this for the specific part that renders the multiline.
return <RichText key={
${rowIndex}-${columnIndex}-list} tagName="ul" multiline="li" value={cellListContent} onChange={(newContent) => updateCellContent(rowIndex, columnIndex, currentCellType, 'listContent', newContent)} />;
I've been trying for a while now to get InnerBlocks to do the job, I kind of got it to work, but when I would change one cell, all other cells with an InnerBlocks unordered list would change as well.
I saw this discussion here, #47395. But it doesn't seem like anybody found a solution in that discussion. Anybody else having any luck getting multiple InnerBlocks in a block to behave individually?
Beta Was this translation helpful? Give feedback.
All reactions