Skip to content

Commit a88f397

Browse files
authored
Merge pull request #24 from PriDebnath/mobile-push
added table ui
2 parents bbbbb80 + 1e5c4dc commit a88f397

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

‎frontend/src/components/common/tiptap-customized.tsx‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import Highlight from "@tiptap/extension-highlight";
1515
import { TableKit } from '@tiptap/extension-table'
1616
import { TextStyle, FontSize } from '@tiptap/extension-text-style'
1717
import Image from '@tiptap/extension-image'
18+
// import Table from "@tiptap/extension-table"
19+
// import TableRow from "@tiptap/extension-table-row"
20+
// import TableCell from "@tiptap/extension-table-cell"
21+
// import TableHeader from "@tiptap/extension-table-header"
1822

1923

2024
interface Props {
@@ -35,6 +39,9 @@ const Tiptap = (props: Props) => {
3539
TextStyle,
3640
FontSize,
3741
Image.configure({
42+
inline: false,
43+
allowBase64: true,
44+
resizable: true,
3845
resize: {
3946
enabled: true,
4047
alwaysPreserveAspectRatio: true,
@@ -48,7 +55,9 @@ const Tiptap = (props: Props) => {
4855
nested: true,
4956
}),
5057
TableKit,
51-
58+
// Table.configure({
59+
// resizable: true,
60+
// })
5261
], // define your extension array
5362
content: value,
5463
editorProps: {

‎frontend/src/tiptap.scss‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,25 @@
33
:first-child {
44
margin-top: 0;
55
}
6+
7+
table {
8+
width: 100%;
9+
border-collapse: collapse;
10+
margin: 1rem 0;
11+
border-radius: var(--radius);
12+
overflow: hidden;
13+
14+
th,
15+
td {
16+
border: 1px solid var(--border);
17+
padding: 0.5rem 0.75rem;
18+
}
19+
20+
th {
21+
background: var(--muted);
22+
font-weight: 500;
23+
}
24+
}
625

726
/* List styles */
827
ul,

0 commit comments

Comments
 (0)