Skip to content

Commit

Permalink
chore: fix super table-related styling and deletion behaviors [skip e2e]
Browse files Browse the repository at this point in the history
  • Loading branch information
amanharwara committed Feb 2, 2024
1 parent 1c6b31f commit 8f15652
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const BlocksEditorTheme: EditorThemeClasses = {
tableCellSortedIndicator: 'Lexical__tableCellSortedIndicator',
tableResizeRuler: 'Lexical__tableCellResizeRuler',
tableSelected: 'Lexical__tableSelected',
tableSelection: 'Lexical__tableSelection',
text: {
bold: 'Lexical__textBold',
code: 'Lexical__textCode',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@
margin: 0.5rem 0;
color: var(--sn-stylekit-contrast-foreground-color);
}
.Lexical__tableSelection *::selection {
background-color: transparent !important;
}
.Lexical__tableSelected {
outline: 2px solid rgb(60, 132, 244);
}
Expand Down Expand Up @@ -149,7 +152,7 @@
top: 0;
}
.Lexical__tableCellHeader {
background-color: var(--sn-stylekit-contrast-background-color) !important;
background-color: var(--sn-stylekit-contrast-background-color);
border-color: var(--sn-stylekit-contrast-border-color);
text-align: start;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ export function RemoveBrokenTablesPlugin() {
}
const hasNextSibling = !!node.getNextSibling()
const hasPreviousSibling = !!node.getPreviousSibling()
if (!node.getParent()) {
return
}
if (!hasNextSibling) {
node.insertAfter($createParagraphNode())
} else if (!hasPreviousSibling) {
Expand Down

0 comments on commit 8f15652

Please sign in to comment.