@ctzhian/tiptap 0.5.0 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Editor/demo.js +1 -1
- package/dist/index.css +42 -19
- package/package.json +1 -1
package/dist/Editor/demo.js
CHANGED
|
@@ -81,7 +81,7 @@ var Reader = function Reader() {
|
|
|
81
81
|
}
|
|
82
82
|
return onUpload;
|
|
83
83
|
}(),
|
|
84
|
-
content: "<p>demo.tsx:12</p><
|
|
84
|
+
content: "<p>demo.tsx:12</p><pre data-title=\"\u6570\u91CF\u98DE\u673A\"><code>export { default as darkPalette } from './dark';\nexport { default as lightPalette } from './light';</code></pre><p></p>"
|
|
85
85
|
}),
|
|
86
86
|
editor = _useTiptap.editor;
|
|
87
87
|
return /*#__PURE__*/React.createElement(EditorThemeProvider, {
|
package/dist/index.css
CHANGED
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
color: var(--mui-palette-text-secondary);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
.tiptap.ProseMirror[contenteditable="false"] {
|
|
10
|
+
padding: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
9
13
|
.tiptap.ProseMirror :first-child {
|
|
10
14
|
margin-top: 0;
|
|
11
15
|
}
|
|
@@ -155,12 +159,14 @@
|
|
|
155
159
|
}
|
|
156
160
|
|
|
157
161
|
/* code */
|
|
162
|
+
.tiptap.ProseMirror .codeblock-wrapper {
|
|
163
|
+
margin-bottom: 16px;
|
|
164
|
+
}
|
|
165
|
+
|
|
158
166
|
.tiptap.ProseMirror pre {
|
|
159
167
|
position: relative;
|
|
160
|
-
border-radius: var(--mui-shape-borderRadius);
|
|
161
168
|
color: var(--mui-palette-common-white);
|
|
162
169
|
background-color: #171c19;
|
|
163
|
-
margin-bottom: 16px;
|
|
164
170
|
}
|
|
165
171
|
|
|
166
172
|
.tiptap.ProseMirror code {
|
|
@@ -356,6 +362,11 @@
|
|
|
356
362
|
transition: all 0.2s ease-in-out;
|
|
357
363
|
}
|
|
358
364
|
|
|
365
|
+
.tiptap.ProseMirror table tbody tr:first-child th,
|
|
366
|
+
.tiptap.ProseMirror table tbody tr:first-child td {
|
|
367
|
+
border-top: 1px solid var(--mui-palette-divider);
|
|
368
|
+
}
|
|
369
|
+
|
|
359
370
|
.tiptap.ProseMirror table td>*,
|
|
360
371
|
.tiptap.ProseMirror table th>* {
|
|
361
372
|
margin-bottom: 0;
|
|
@@ -376,25 +387,41 @@
|
|
|
376
387
|
background-color: var(--mui-palette-background-default);
|
|
377
388
|
}
|
|
378
389
|
|
|
379
|
-
/* 表格悬停时显示所有列边框 */
|
|
380
|
-
.tiptap.ProseMirror table:hover {
|
|
390
|
+
/* 表格悬停时显示所有列边框 - 只在编辑模式下生效 */
|
|
391
|
+
.tiptap.ProseMirror[contenteditable="true"] table:hover {
|
|
381
392
|
border-left: 1px dotted var(--mui-palette-divider);
|
|
382
393
|
border-right: 1px dotted var(--mui-palette-divider);
|
|
383
394
|
}
|
|
384
395
|
|
|
385
|
-
.tiptap.ProseMirror table:hover td,
|
|
386
|
-
.tiptap.ProseMirror table:hover th {
|
|
396
|
+
.tiptap.ProseMirror[contenteditable="true"] table:hover td,
|
|
397
|
+
.tiptap.ProseMirror[contenteditable="true"] table:hover th {
|
|
387
398
|
border-right-color: var(--mui-palette-divider);
|
|
388
399
|
border-right-style: dotted;
|
|
389
400
|
}
|
|
390
401
|
|
|
391
|
-
.tiptap.ProseMirror table:hover td:last-child,
|
|
392
|
-
.tiptap.ProseMirror table:hover th:last-child {
|
|
402
|
+
.tiptap.ProseMirror[contenteditable="true"] table:hover td:last-child,
|
|
403
|
+
.tiptap.ProseMirror[contenteditable="true"] table:hover th:last-child {
|
|
404
|
+
border-right-color: transparent;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.tiptap.ProseMirror[contenteditable="false"] table {
|
|
408
|
+
border-left: 1px dotted var(--mui-palette-divider);
|
|
409
|
+
border-right: 1px dotted var(--mui-palette-divider);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.tiptap.ProseMirror[contenteditable="false"] table td,
|
|
413
|
+
.tiptap.ProseMirror[contenteditable="false"] table th {
|
|
414
|
+
border-right-color: var(--mui-palette-divider);
|
|
415
|
+
border-right-style: dotted;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.tiptap.ProseMirror[contenteditable="false"] table td:last-child,
|
|
419
|
+
.tiptap.ProseMirror[contenteditable="false"] table th:last-child {
|
|
393
420
|
border-right-color: transparent;
|
|
394
421
|
}
|
|
395
422
|
|
|
396
423
|
/* 表格选择状态 */
|
|
397
|
-
.tiptap.ProseMirror table .selectedCell:after {
|
|
424
|
+
.tiptap.ProseMirror[contenteditable="true"] table .selectedCell:after {
|
|
398
425
|
background-color: color-mix(in srgb, var(--mui-palette-primary-main) 12%, transparent);
|
|
399
426
|
content: '';
|
|
400
427
|
left: 0;
|
|
@@ -408,17 +435,17 @@
|
|
|
408
435
|
/* border: 2px solid var(--mui-palette-primary-main); */
|
|
409
436
|
}
|
|
410
437
|
|
|
411
|
-
.tiptap.ProseMirror table .selectedCell {
|
|
438
|
+
.tiptap.ProseMirror[contenteditable="true"] table .selectedCell {
|
|
412
439
|
background-color: color-mix(in srgb, var(--mui-palette-primary-main) 5%, transparent) !important;
|
|
413
440
|
}
|
|
414
441
|
|
|
415
442
|
/* 选中单元格的边框样式 - 只改变最外圈边框颜色 */
|
|
416
|
-
.tiptap.ProseMirror table .selectedCell {
|
|
443
|
+
.tiptap.ProseMirror[contenteditable="true"] table .selectedCell {
|
|
417
444
|
border-color: var(--mui-palette-primary-main) !important;
|
|
418
445
|
}
|
|
419
446
|
|
|
420
447
|
/* 表格列调整手柄 */
|
|
421
|
-
.tiptap.ProseMirror table .column-resize-handle {
|
|
448
|
+
.tiptap.ProseMirror[contenteditable="true"] table .column-resize-handle {
|
|
422
449
|
background-color: transparent;
|
|
423
450
|
border-right: 2px dotted var(--mui-palette-primary-main);
|
|
424
451
|
bottom: -2px;
|
|
@@ -444,21 +471,17 @@
|
|
|
444
471
|
|
|
445
472
|
/* 表格滚动条样式 */
|
|
446
473
|
.tiptap.ProseMirror .tableWrapper::-webkit-scrollbar {
|
|
447
|
-
height:
|
|
474
|
+
height: 2px;
|
|
448
475
|
}
|
|
449
476
|
|
|
450
477
|
.tiptap.ProseMirror .tableWrapper::-webkit-scrollbar-track {
|
|
451
|
-
background: var(--mui-palette-background-paper2);
|
|
452
|
-
border-radius: 4px;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
.tiptap.ProseMirror .tableWrapper::-webkit-scrollbar-thumb {
|
|
456
478
|
background: var(--mui-palette-divider);
|
|
457
479
|
border-radius: 4px;
|
|
458
480
|
}
|
|
459
481
|
|
|
460
|
-
.tiptap.ProseMirror .tableWrapper::-webkit-scrollbar-thumb
|
|
482
|
+
.tiptap.ProseMirror .tableWrapper::-webkit-scrollbar-thumb {
|
|
461
483
|
background: var(--mui-palette-text-disabled);
|
|
484
|
+
border-radius: 4px;
|
|
462
485
|
}
|
|
463
486
|
|
|
464
487
|
/* youtube */
|