File tree Expand file tree Collapse file tree 4 files changed +31
-106
lines changed
components/shared/rich-editor Expand file tree Collapse file tree 4 files changed +31
-106
lines changed Original file line number Diff line number Diff line change 217
217
animation-delay : 4s ;
218
218
}
219
219
220
- /* List styles */
221
- ul ,
222
- ol {
223
- list-style : none;
224
- margin : 0 ;
225
-
226
- li p {
227
- display : inline;
228
- }
229
- }
230
- ol {
231
- list-style-type : none;
232
- counter-reset : list-0 list-1 list-2 list-3 list-4;
233
- margin : 0 ;
234
- }
235
- h1 ,
236
- h2 ,
237
- h3 ,
238
- h4 ,
239
- h5 ,
240
- h6 {
241
- }
242
-
243
- h1 ,
244
- h2 {
245
- }
246
-
247
- h1 {
248
- font-size : 1.4rem ;
249
- }
250
-
251
- h2 {
252
- font-size : 1.2rem ;
253
- }
254
-
255
- h3 {
256
- font-size : 1.1rem ;
257
- }
258
-
259
- h4 ,
260
- h5 ,
261
- h6 {
262
- font-size : 1rem ;
263
- }
264
-
265
- code {
266
- background-color : rgba (27 , 31 , 35 , 0.05 );
267
- border-radius : 0.4rem ;
268
- color : black;
269
- font-size : 0.85rem ;
270
- padding : 0.25em 0.3em ;
271
- }
272
-
273
- pre {
274
- background : black;
275
- border-radius : 0.5rem ;
276
- color : white;
277
- font-family : "JetBrainsMono" , monospace;
278
- margin : 1.5rem 0 ;
279
- padding : 0.75rem 1rem ;
280
-
281
- code {
282
- background : none;
283
- color : inherit;
284
- font-size : 0.8rem ;
285
- padding : 0 ;
286
- }
287
- }
288
-
289
- blockquote {
290
- border-left : 3px solid gray;
291
- margin : 1.5rem 0 ;
292
- padding-left : 1rem ;
293
- }
294
-
295
- hr {
296
- border : none;
297
- border-top : 1px solid gray;
298
- margin : 2rem 0 ;
299
- }
300
-
301
220
* {
302
221
margin : 0 ;
303
222
padding : 0 ;
304
223
box-sizing : border-box;
305
224
}
306
225
307
- .custom-list ,
226
+ /* .custom-list,
308
227
.custom-list-ordered {
309
228
list-style-type: none;
310
229
}
311
230
312
231
.custom-list li::marker,
313
232
.custom-list-ordered li::marker {
314
233
display: none;
315
- }
234
+ } */
316
235
317
- .custom-list li ::before {
236
+ /* .custom-list li::before {
318
237
content: "•";
319
- /* width: 4px;
320
- height: 4px;
321
- border-radius: 50%;
322
- background: #000;
323
- vertical-align: middle; */
324
238
display: inline-block;
325
239
margin-right: 10px;
326
- }
240
+ } */
327
241
328
- .custom-list-ordered li ::before {
242
+ /* .custom-list-ordered li::before {
329
243
content: counter(list-0, decimal) ". ";
330
244
counter-increment: list-0;
331
245
display: inline-block;
332
246
margin-right: 5px;
247
+ } */
248
+
249
+ .custom-list {
250
+ list-style-type : disc;
251
+ padding : 0 1rem ;
252
+ }
253
+
254
+ .custom-list li p {
255
+ margin-top : 0.25em ;
256
+ margin-bottom : 0.25em ;
257
+ }
258
+
259
+ .custom-list-ordered {
260
+ list-style-type : decimal;
261
+ padding : 0 1rem ;
262
+ }
263
+
264
+ .custom-list-ordered li p {
265
+ margin-top : 0.25em ;
333
266
}
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ export const metadata: Metadata = {
17
17
follow : true ,
18
18
"max-video-preview" : - 1 ,
19
19
"max-image-preview" : "large" ,
20
- "max-snippet" : - 1
21
- }
22
- }
20
+ "max-snippet" : - 1 ,
21
+ } ,
22
+ } ,
23
23
} ;
24
24
25
25
export default function RootLayout ( { children } : Props ) {
Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ import { cn } from "@/lib/utils";
37
37
import ListItem from "@tiptap/extension-list-item" ;
38
38
import BulletList from "@tiptap/extension-bullet-list" ;
39
39
import OrderedList from "@tiptap/extension-ordered-list" ;
40
+
41
+ import "@/styles/tiptap.scss" ;
42
+
40
43
interface RichTextEditorProps {
41
44
content ?: string ;
42
45
onChange : ( content : string ) => void ;
Original file line number Diff line number Diff line change 1
- /* Basic editor styles */
2
1
.tiptap {
3
2
min-height : 300px ;
4
- border : 1px solid #d1d5db ;
5
- padding : 2px ;
6
3
border-radius : 0 0 4px 4px ;
7
- :first-child {
8
- margin-top : 0 ;
9
- }
10
-
11
- /* List styles */
12
4
ul ,
13
5
ol {
14
6
list-style-type : disc ;
15
7
padding : 0 1rem ;
16
- margin : 1.25rem 1rem 1.25rem 0.4rem ;
17
8
18
9
li p {
19
10
margin-top : 0.25em ;
22
13
}
23
14
ol {
24
15
list-style-type : decimal ;
25
- padding : 0 1rem ;
26
- margin : 1.25rem 1rem 1.25rem 0.4rem ;
16
+ padding : 1rem ;
27
17
28
18
li p {
29
19
margin-top : 0.25em ;
66
56
font-size : 1rem ;
67
57
}
68
58
69
- /* Code and preformatted text styles */
70
59
code {
71
60
background-color : rgba (27 , 31 , 35 , 0.05 );
72
61
border-radius : 0.4rem ;
You can’t perform that action at this time.
0 commit comments