Skip to content

Commit b99f863

Browse files
committed
fix: table border styling
1 parent 943bbda commit b99f863

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

packages/pluggableWidgets/rich-text-web/src/utils/formats/quill-table-better/assets/css/quill-table-better.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,13 @@ $focused-border: 1px solid $focused-border-color;
6969
background-color: $focused-cell-background;
7070
}
7171

72-
.ql-editor {
72+
.ql-editor td {
73+
border: none;
74+
}
75+
76+
.ql-container:not(.ql-disabled) .ql-table-better {
7377
td {
74-
border: none;
78+
border: 1px dotted rgba(0, 0, 0, 0.1);
7579
}
7680
}
7781

packages/pluggableWidgets/rich-text-web/src/utils/formats/quill-table-better/quill-table-better.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,10 @@ class Table extends Module {
170170
}
171171

172172
insertTable(rows: number, columns: number) {
173-
const baseStyle = "border: 1px solid #000;";
174173
const range = this.quill.getSelection(true);
175174
if (range == null) return;
176175
if (this.isTable(range)) return;
177-
const style = `width: ${CELL_DEFAULT_WIDTH * columns}px; ${baseStyle}`;
176+
const style = `width: ${CELL_DEFAULT_WIDTH * columns}px;`;
178177
const formats = this.quill.getFormat(range.index - 1);
179178
const [, offset] = this.quill.getLine(range.index);
180179
const isExtra = !!formats[TableCellBlock.blotName] || offset !== 0;
@@ -190,7 +189,7 @@ class Table extends Module {
190189
return new Array(columns).fill("\n").reduce((memo, text) => {
191190
return memo.insert(text, {
192191
[TableCellBlock.blotName]: cellId(),
193-
[TableCell.blotName]: { "data-row": id, width: `${CELL_DEFAULT_WIDTH}`, style: baseStyle }
192+
[TableCell.blotName]: { "data-row": id, width: `${CELL_DEFAULT_WIDTH}` }
194193
});
195194
}, memo);
196195
}, base);

0 commit comments

Comments
 (0)