Skip to content

Commit c4c383d

Browse files
committed
fix: table better show grid
1 parent b99f863 commit c4c383d

File tree

13 files changed

+62
-5
lines changed

13 files changed

+62
-5
lines changed

packages/pluggableWidgets/rich-text-web/src/components/Editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const Editor = forwardRef((props: EditorProps, ref: MutableRefObject<Quill | nul
131131
table: false,
132132
"table-better": {
133133
language: "en_US",
134-
menus: ["column", "row", "merge", "table", "cell", "wrap", "copy", "delete"],
134+
menus: ["column", "row", "merge", "table", "cell", "wrap", "copy", "delete", "grid"],
135135
toolbarTable: !readOnly
136136
},
137137
toolbar

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ $focused-border: 1px solid $focused-border-color;
7373
border: none;
7474
}
7575

76-
.ql-container:not(.ql-disabled) .ql-table-better {
76+
.ql-container:not(.ql-disabled) .ql-table-better.ql-table-grid {
7777
td {
7878
border: 1px dotted rgba(0, 0, 0, 0.1);
7979
}
@@ -663,3 +663,9 @@ ol.table-list-container {
663663
transform: translateX(1px);
664664
}
665665
}
666+
667+
.ql-table-menus-container.ql-table-grid {
668+
.grid-toggle {
669+
color: var(--link-color);
670+
}
671+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default {
1616
insAft: "Danach einfügen",
1717
copyTable: "Tabelle kopieren",
1818
delTable: "Tabelle löschen",
19+
showGrid: "Raster anzeigen",
1920
border: "Rahmen",
2021
color: "Farbe",
2122
width: "Breite",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default {
1616
insAft: "Insert after",
1717
copyTable: "Copy table",
1818
delTable: "Delete table",
19+
showGrid: "Show grid",
1920
border: "Border",
2021
color: "Color",
2122
width: "Width",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default {
1616
insAft: "Insérer après",
1717
copyTable: "Copier le tableau",
1818
delTable: "Supprimer le tableau",
19+
showGrid: "Afficher la grille",
1920
border: "Bordure",
2021
color: "Couleur",
2122
width: "Largeur",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default {
1616
insAft: "Wstaw po",
1717
copyTable: "Kopiuj tabelę",
1818
delTable: "Usuń tabelę",
19+
showGrid: "Pokaż siatkę",
1920
border: "Obramowanie",
2021
color: "Kolor",
2122
width: "Szerokość",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default {
1616
insAft: "Вставить абзац после",
1717
copyTable: "Копировать таблицу",
1818
delTable: "Удалить таблицу",
19+
showGrid: "Показать сетку",
1920
border: "Обводка",
2021
color: "Цвет",
2122
width: "Ширина",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default {
1616
insAft: "Sonrasına ekle",
1717
copyTable: "Tabloyu kopyala",
1818
delTable: "Tabloyu sil",
19+
showGrid: "Izgarayı göster",
1920
border: "Kenarlık",
2021
color: "Renk",
2122
width: "Genişlik",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default {
1616
insAft: "在表格后面插入",
1717
copyTable: "复制表格",
1818
delTable: "删除表格",
19+
showGrid: "显示网格",
1920
border: "边框",
2021
color: "颜色",
2122
width: "宽度",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ class Table extends Module {
196196
this.quill.updateContents(delta, Quill.sources.USER);
197197
this.quill.setSelection(range.index + _offset, Quill.sources.SILENT);
198198
this.showTools();
199+
this.tableMenus.showGrid(true);
199200
}
200201

201202
// Inserting tables within tables is currently not supported

0 commit comments

Comments
 (0)