fix: handle rte table overflow on smaller screens
This commit is contained in:
@@ -55,6 +55,10 @@
|
|||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tableContainer {
|
||||||
|
max-width: 100%;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (min-width: 768px) {
|
||||||
.ol:has(li:nth-last-child(n + 5)),
|
.ol:has(li:nth-last-child(n + 5)),
|
||||||
.ul:has(li:nth-last-child(n + 5)) {
|
.ul:has(li:nth-last-child(n + 5)) {
|
||||||
|
|||||||
@@ -376,9 +376,11 @@ export const renderOptions: RenderOptions = {
|
|||||||
) => {
|
) => {
|
||||||
const props = extractPossibleAttributes(node.attrs)
|
const props = extractPossibleAttributes(node.attrs)
|
||||||
return (
|
return (
|
||||||
<Table key={node.uid} {...props}>
|
<div className={styles.tableContainer}>
|
||||||
{next(node.children, embeds, fullRenderOptions)}
|
<Table key={node.uid} {...props}>
|
||||||
</Table>
|
{next(node.children, embeds, fullRenderOptions)}
|
||||||
|
</Table>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user