@ctzhian/tiptap 0.5.2 → 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.
@@ -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: false,
12
+ editable: true,
13
13
  exclude: ['invisibleCharacters'],
14
14
  onSave: function onSave(editor) {
15
15
  console.log(editor.getHTML());
@@ -81,7 +81,7 @@ var Reader = function Reader() {
81
81
  }
82
82
  return onUpload;
83
83
  }(),
84
- content: "<p>demo.tsx:12</p><p>\u98DE\u673A\u554A\u7684\u6570<code>\u91CF\u5496\u5561\u5C31\u62C9\u4E0A\u98DE\u673A</code>\u554A\u8001<a target=\"_blank\" type=\"icon\" href=\"https://www.baidu.com\" title=\"\u5E08\u7684\u98DE\u673A\u62C9\u591A\">\u5E08\u7684\u98DE\u673A\u62C9\u591A</a>\u5C11\u5206\uFF0C\u98DE<a target=\"_blank\" type=\"text\" href=\"https://remixicon.com/\" title=\"\u673A\u554A\u4E0A\u98DE\u673A\u62C9\u5FB7\">\u673A\u554A\u4E0A\u98DE\u673A\u62C9\u5FB7</a>\u65AF\u57FA\u5F17\u62C9\u7D22\u592B\u5362\u5361\u65AF\u5230\u5BB6\u4E86\u98DE\u673A\u554A\u7684\u6570\u91CF\u5496\u5561\u5C31\u62C9\u4E0A\u98DE\u673A\u554A\u8001\u5E08\u7684\u98DE\u673A\u62C9\u591A\u5C11\u5206\uFF0C\u98DE\u673A\u554A\u4E0A\u98DE\u673A\u62C9\u5FB7\u65AF\u57FA\u5206\uFF0C\u98DE\u673A\u554A\u4E0A<a target=\"_blank\" type=\"icon\" href=\"afsd\" title=\"\u98DE\u673A\u62C9\u5FB7\u65AF\">\u98DE\u673A\u62C9\u5FB7\u65AF</a>\u57FA\u5F17\u62C9\u7D22</p><div class=\"tableWrapper\"><table style=\"min-width: 436px;\"><colgroup><col style=\"width: 136px;\"><col style=\"min-width: 100px;\"><col style=\"min-width: 100px;\"><col style=\"min-width: 100px;\"></colgroup><tbody><tr class=\"table-row\"><th class=\"table-header\" colspan=\"1\" rowspan=\"1\" colwidth=\"136\"><p>\u6587\u672C\u4E00</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>\u6587\u672C\u800C</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>\u6587\u672C\u4E09</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>\u6587\u672C\u56DB</p></th></tr><tr class=\"table-row\"><td colspan=\"1\" rowspan=\"1\" colwidth=\"136\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u6D4B\u8BD5\u6570\u636E</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u5386\u53F2\u4E8B\u4EF6</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u798F\u514B\u65AF</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u62C9\u8428</p></td></tr><tr class=\"table-row\"><td colspan=\"1\" rowspan=\"1\" colwidth=\"136\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u6536\u62FE\u6536\u62FE</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u798F\u514B\u65AF\u5566\u53D1\u5927\u6C34</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u91CD\u65B0\u4F60\u54E6\u95EE\u7C89\u4E1D</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u98DE\u673A\u554A\u5723\u8BDE\u5FEB\u4E50</p></td></tr></tbody></table></div><p></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
@@ -159,12 +159,14 @@
159
159
  }
160
160
 
161
161
  /* code */
162
+ .tiptap.ProseMirror .codeblock-wrapper {
163
+ margin-bottom: 16px;
164
+ }
165
+
162
166
  .tiptap.ProseMirror pre {
163
167
  position: relative;
164
- border-radius: var(--mui-shape-borderRadius);
165
168
  color: var(--mui-palette-common-white);
166
169
  background-color: #171c19;
167
- margin-bottom: 16px;
168
170
  }
169
171
 
170
172
  .tiptap.ProseMirror code {
@@ -360,6 +362,11 @@
360
362
  transition: all 0.2s ease-in-out;
361
363
  }
362
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
+
363
370
  .tiptap.ProseMirror table td>*,
364
371
  .tiptap.ProseMirror table th>* {
365
372
  margin-bottom: 0;
@@ -464,21 +471,17 @@
464
471
 
465
472
  /* 表格滚动条样式 */
466
473
  .tiptap.ProseMirror .tableWrapper::-webkit-scrollbar {
467
- height: 8px;
474
+ height: 2px;
468
475
  }
469
476
 
470
477
  .tiptap.ProseMirror .tableWrapper::-webkit-scrollbar-track {
471
- background: var(--mui-palette-background-paper2);
472
- border-radius: 4px;
473
- }
474
-
475
- .tiptap.ProseMirror .tableWrapper::-webkit-scrollbar-thumb {
476
478
  background: var(--mui-palette-divider);
477
479
  border-radius: 4px;
478
480
  }
479
481
 
480
- .tiptap.ProseMirror .tableWrapper::-webkit-scrollbar-thumb:hover {
482
+ .tiptap.ProseMirror .tableWrapper::-webkit-scrollbar-thumb {
481
483
  background: var(--mui-palette-text-disabled);
484
+ border-radius: 4px;
482
485
  }
483
486
 
484
487
  /* youtube */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctzhian/tiptap",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "基于 Tiptap 二次开发的编辑器组件",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",