@ctzhian/tiptap 0.5.0 → 0.5.2
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 +30 -10
- package/package.json +1 -1
package/dist/Editor/demo.js
CHANGED
|
@@ -9,7 +9,7 @@ import { AiGenerate2Icon } from "../component/Icons";
|
|
|
9
9
|
import "../index.css";
|
|
10
10
|
var Reader = function Reader() {
|
|
11
11
|
var _useTiptap = useTiptap({
|
|
12
|
-
editable:
|
|
12
|
+
editable: false,
|
|
13
13
|
exclude: ['invisibleCharacters'],
|
|
14
14
|
onSave: function onSave(editor) {
|
|
15
15
|
console.log(editor.getHTML());
|
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
|
}
|
|
@@ -376,25 +380,41 @@
|
|
|
376
380
|
background-color: var(--mui-palette-background-default);
|
|
377
381
|
}
|
|
378
382
|
|
|
379
|
-
/* 表格悬停时显示所有列边框 */
|
|
380
|
-
.tiptap.ProseMirror table:hover {
|
|
383
|
+
/* 表格悬停时显示所有列边框 - 只在编辑模式下生效 */
|
|
384
|
+
.tiptap.ProseMirror[contenteditable="true"] table:hover {
|
|
385
|
+
border-left: 1px dotted var(--mui-palette-divider);
|
|
386
|
+
border-right: 1px dotted var(--mui-palette-divider);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.tiptap.ProseMirror[contenteditable="true"] table:hover td,
|
|
390
|
+
.tiptap.ProseMirror[contenteditable="true"] table:hover th {
|
|
391
|
+
border-right-color: var(--mui-palette-divider);
|
|
392
|
+
border-right-style: dotted;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.tiptap.ProseMirror[contenteditable="true"] table:hover td:last-child,
|
|
396
|
+
.tiptap.ProseMirror[contenteditable="true"] table:hover th:last-child {
|
|
397
|
+
border-right-color: transparent;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.tiptap.ProseMirror[contenteditable="false"] table {
|
|
381
401
|
border-left: 1px dotted var(--mui-palette-divider);
|
|
382
402
|
border-right: 1px dotted var(--mui-palette-divider);
|
|
383
403
|
}
|
|
384
404
|
|
|
385
|
-
.tiptap.ProseMirror table
|
|
386
|
-
.tiptap.ProseMirror table
|
|
405
|
+
.tiptap.ProseMirror[contenteditable="false"] table td,
|
|
406
|
+
.tiptap.ProseMirror[contenteditable="false"] table th {
|
|
387
407
|
border-right-color: var(--mui-palette-divider);
|
|
388
408
|
border-right-style: dotted;
|
|
389
409
|
}
|
|
390
410
|
|
|
391
|
-
.tiptap.ProseMirror table
|
|
392
|
-
.tiptap.ProseMirror table
|
|
411
|
+
.tiptap.ProseMirror[contenteditable="false"] table td:last-child,
|
|
412
|
+
.tiptap.ProseMirror[contenteditable="false"] table th:last-child {
|
|
393
413
|
border-right-color: transparent;
|
|
394
414
|
}
|
|
395
415
|
|
|
396
416
|
/* 表格选择状态 */
|
|
397
|
-
.tiptap.ProseMirror table .selectedCell:after {
|
|
417
|
+
.tiptap.ProseMirror[contenteditable="true"] table .selectedCell:after {
|
|
398
418
|
background-color: color-mix(in srgb, var(--mui-palette-primary-main) 12%, transparent);
|
|
399
419
|
content: '';
|
|
400
420
|
left: 0;
|
|
@@ -408,17 +428,17 @@
|
|
|
408
428
|
/* border: 2px solid var(--mui-palette-primary-main); */
|
|
409
429
|
}
|
|
410
430
|
|
|
411
|
-
.tiptap.ProseMirror table .selectedCell {
|
|
431
|
+
.tiptap.ProseMirror[contenteditable="true"] table .selectedCell {
|
|
412
432
|
background-color: color-mix(in srgb, var(--mui-palette-primary-main) 5%, transparent) !important;
|
|
413
433
|
}
|
|
414
434
|
|
|
415
435
|
/* 选中单元格的边框样式 - 只改变最外圈边框颜色 */
|
|
416
|
-
.tiptap.ProseMirror table .selectedCell {
|
|
436
|
+
.tiptap.ProseMirror[contenteditable="true"] table .selectedCell {
|
|
417
437
|
border-color: var(--mui-palette-primary-main) !important;
|
|
418
438
|
}
|
|
419
439
|
|
|
420
440
|
/* 表格列调整手柄 */
|
|
421
|
-
.tiptap.ProseMirror table .column-resize-handle {
|
|
441
|
+
.tiptap.ProseMirror[contenteditable="true"] table .column-resize-handle {
|
|
422
442
|
background-color: transparent;
|
|
423
443
|
border-right: 2px dotted var(--mui-palette-primary-main);
|
|
424
444
|
bottom: -2px;
|