@ctzhian/tiptap 1.0.0 → 1.1.0
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/EditorDiff/demo.js +1 -1
- package/dist/EditorToolbar/index.js +19 -3
- package/dist/component/CustomBubbleMenu/SelectionText.js +1 -1
- package/dist/component/CustomDragHandle/index.js +237 -191
- package/dist/component/Icons/index.d.ts +1 -0
- package/dist/component/Icons/index.js +1 -0
- package/dist/component/Icons/information-2-line-icon.d.ts +6 -0
- package/dist/component/Icons/information-2-line-icon.js +13 -0
- package/dist/component/Menu/NestedList.d.ts +14 -0
- package/dist/component/Menu/NestedList.js +149 -0
- package/dist/component/Menu/index.js +12 -117
- package/dist/component/Toolbar/EditorCode.js +1 -1
- package/dist/component/Toolbar/EditorMore/NotificationDialog.js +2 -1
- package/dist/component/index.d.ts +2 -0
- package/dist/component/index.js +3 -1
- package/dist/contants/enums.d.ts +1 -0
- package/dist/contants/enums.js +10 -3
- package/dist/contants/shortcut-key.js +1 -1
- package/dist/contants/slash-commands.d.ts +2 -1
- package/dist/contants/slash-commands.js +98 -42
- package/dist/extension/component/Alert/index.d.ts +7 -9
- package/dist/extension/component/Alert/index.js +186 -109
- package/dist/extension/component/SlashCommandsList/index.js +235 -100
- package/dist/extension/node/Alert.d.ts +19 -8
- package/dist/extension/node/Alert.js +210 -131
- package/dist/extension/suggestion/slash.d.ts +2 -1
- package/dist/extension/suggestion/slash.js +3 -1
- package/dist/index.css +14 -26
- package/dist/type/index.d.ts +11 -2
- 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: "
|
|
84
|
+
content: "<blockquote><p>\u98DE\u673A\u554A\u6B7B\u4E86\u6253\u98DE\u673A\u554A\u6536\u5230\u4E86</p></blockquote><p></p>"
|
|
85
85
|
}),
|
|
86
86
|
editor = _useTiptap.editor;
|
|
87
87
|
return /*#__PURE__*/React.createElement(EditorThemeProvider, {
|
package/dist/EditorDiff/demo.js
CHANGED
|
@@ -5,7 +5,7 @@ var EditorDiffDemo = function EditorDiffDemo() {
|
|
|
5
5
|
return /*#__PURE__*/React.createElement(EditorThemeProvider, {
|
|
6
6
|
mode: "light"
|
|
7
7
|
}, /*#__PURE__*/React.createElement(EditorDiff, {
|
|
8
|
-
oldHtml: "\n <p>\u53D1\u751F\u5927\u89E3\u653E\u4E86\u5361\u4E0A\u6253\u98DE\u673A\uFF0C\u53D1\u751F\u7B80<a target=\"_blank\" type=\"text\" href=\"\u4E8B\u5B9E\u4E0A\" title=\"\u5355\u5FEB\u4E50\u98DE\u673A\">\u5355\u5FEB\u4E50\u98DE\u673A</a>\u963F\u65AF\u5229\u5EB7\u53D1\u7684\u3002</p><p><img src=\"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg\" width=\"212\"></p><p><span data-tag=\"attachment\" url=\"\" title=\"\" size=\"0\" data-url=\"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg\" data-title=\"images.jpeg\" data-size=\"6.81 KB\"></span></p><div data-tag=\"attachment\" url=\"\" title=\"\" size=\"0\" data-url=\"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg\" data-title=\"monkeycode-1.20.0.vsix\" data-size=\"27.94 MB\"></div><video class=\"video-wrapper\" src=\"http://vjs.zencdn.net/v/oceans.mp4\" controls=\"true\" width=\"760\"></video><audio class=\"audio-wrapper\" src=\"http://vjs.zencdn.net/v/oceans.mp4\" controls=\"true\"></audio><details class=\"cq-details\"><summary>\u98DE\u673A\u963F\u91CC\u65AF\u987F\u770B\u98CE\u666F</summary><div data-type=\"detailsContent\"><p>\u8FD9\u662F<strong>\u4E00\u6BB5\u5F88\u957F\u7684\u6587</strong>\u672C\uFF0C\u96F7\u6C60 <s>WAF</s> \u662F\u4E00\u6B3E\u7B80\u5355\u9AD8<span style=\"color: rgb(216, 164, 127);\">\u6548\u7684 Web \u5E94</span>\u7528\u9632<span style=\"background-color: rgb(179, 229, 252);\">\u706B\u5899\uFF0C\u80FD</span>\u6709\u6548\u9632\u5FA1 S<sup>L</sup> \u6CE8\u5165\u3001X<sub>SS</sub> \u7B49\u5404\u7C7B Web \u653B\u51FB\uFF0C\u63D0\u4F9B\u8BBF\u95EE\u9891\u7387\u9650\u5236\u3001\u4EBA\u673A\u9A8C\u8BC1\u3001\u52A8<code>\u6001\u9632\u62A4\u7B49</code>\u529F\u80FD\u3002<em>\u5168</em><a target=\"_blank\" type=\"icon\" href=\"https://www.baidu.com\" title=\"\u7403\u88C5\u673A\u91CF\">\u7403\u88C5\u673A\u91CF</a><em>\u8D85 30 \u4E07\u53F0</em>\uFF0C<u>\u65E5\u5747\u5904\u7406 300 \u4EBF\u6B21\u8BF7</u>\u6C42\u3002<span data-latex=\"x + y = 1\" data-type=\"inline-math\"></span></p><div class=\"tableWrapper\"><table style=\"min-width: 400px;\"><colgroup><col style=\"min-width: 100px;\"><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\"><p>1</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>2</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>3</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>4</p></th></tr><tr class=\"table-row\"><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>5</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>6</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>7</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>8</p></td></tr><tr class=\"table-row\"><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>9</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>10</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>11</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>12</p></td></tr></tbody></table></div><div data-latex=\"x + y + z = 1\" data-type=\"block-math\"></div><pre><code>export const DetailsExtension = CustomDetails.configure({\n persist: true,\n openClassName: 'is-open',\n HTMLAttributes: {\n class: 'cq-details',\n },\n});\n\nexport const DetailsSummaryExtension = DetailsSummary.configure({\n});\n\nexport const DetailsContentExtension = DetailsContent.configure({\n});</code></pre><ol class=\"ordered-list\" data-type=\"orderedList\"><li><p>\u8FD9\u662F\u5217\u8868</p></li><li><p>\u793A\u4F8B\u793A\u4F8B\u8DEF\u4E0A\u4E86</p></li></ol><blockquote><p>\u6570\u636E\u554A\u514B\u5229\u592B\u5170\u6492\u98DE\u673A\u62C9\u5361\u4E0A\u6253\u98DE\u673A\u554A\u770B\u5230\u4E86\u5730\u65B9\u3002</p></blockquote></div></details><p></p>\n ",
|
|
8
|
+
oldHtml: "\n <p>\u53D1\u751F\u5927\u89E3\u653E\u4E86\u5361\u4E0A\u6253\u98DE\u673A\uFF0C\u53D1\u751F\u7B80<a target=\"_blank\" type=\"text\" href=\"\u4E8B\u5B9E\u4E0A\" title=\"\u5355\u5FEB\u4E50\u98DE\u673A\">\u5355\u5FEB\u4E50\u98DE\u673A</a>\u963F\u65AF\u5229\u5EB7\u53D1\u7684\u3002</p><p><img src=\"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg\" width=\"212\"></p><p><span data-tag=\"attachment\" url=\"\" title=\"\" size=\"0\" data-url=\"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg\" data-title=\"images.jpeg\" data-size=\"6.81 KB\"></span></p><div data-tag=\"attachment\" url=\"\" title=\"\" size=\"0\" data-url=\"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg\" data-title=\"monkeycode-1.20.0.vsix\" data-size=\"27.94 MB\"></div><video class=\"video-wrapper\" src=\"http://vjs.zencdn.net/v/oceans.mp4\" controls=\"true\" width=\"760\"></video><audio class=\"audio-wrapper\" src=\"http://vjs.zencdn.net/v/oceans.mp4\" controls=\"true\"></audio><details class=\"cq-details\" open=\"\"><summary>\u98DE\u673A\u963F\u91CC\u65AF\u987F\u770B\u98CE\u666F</summary><div data-type=\"detailsContent\"><p>\u8FD9\u662F<strong>\u4E00\u6BB5\u5F88\u957F\u7684\u6587</strong>\u672C\uFF0C\u96F7\u6C60 <s>WAF</s> \u662F\u4E00\u6B3E\u7B80\u5355\u9AD8<span style=\"color: rgb(216, 164, 127);\">\u6548\u7684 Web \u5E94</span>\u7528\u9632<span style=\"background-color: rgb(179, 229, 252);\">\u706B\u5899\uFF0C\u80FD</span>\u6709\u6548\u9632\u5FA1 S<sup>L</sup> \u6CE8\u5165\u3001X<sub>SS</sub> \u7B49\u5404\u7C7B Web \u653B\u51FB\uFF0C\u63D0\u4F9B\u8BBF\u95EE\u9891\u7387\u9650\u5236\u3001\u4EBA\u673A\u9A8C\u8BC1\u3001\u52A8<code>\u6001\u9632\u62A4\u7B49</code>\u529F\u80FD\u3002<em>\u5168</em><a target=\"_blank\" type=\"icon\" href=\"https://www.baidu.com\" title=\"\u7403\u88C5\u673A\u91CF\">\u7403\u88C5\u673A\u91CF</a><em>\u8D85 30 \u4E07\u53F0</em>\uFF0C<u>\u65E5\u5747\u5904\u7406 300 \u4EBF\u6B21\u8BF7</u>\u6C42\u3002<span data-latex=\"x + y = 1\" data-type=\"inline-math\"></span></p><div class=\"tableWrapper\"><table style=\"min-width: 400px;\"><colgroup><col style=\"min-width: 100px;\"><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\"><p>1</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>2</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>3</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>4</p></th></tr><tr class=\"table-row\"><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>5</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>6</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>7</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>8</p></td></tr><tr class=\"table-row\"><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>9</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>10</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>11</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>12</p></td></tr></tbody></table></div><div data-latex=\"x + y + z = 1\" data-type=\"block-math\"></div><pre><code>export const DetailsExtension = CustomDetails.configure({\n persist: true,\n openClassName: 'is-open',\n HTMLAttributes: {\n class: 'cq-details',\n },\n});\n\nexport const DetailsSummaryExtension = DetailsSummary.configure({\n});\n\nexport const DetailsContentExtension = DetailsContent.configure({\n});</code></pre><ol class=\"ordered-list\" data-type=\"orderedList\"><li><p>\u8FD9\u662F\u5217\u8868</p></li><li><p>\u793A\u4F8B\u793A\u4F8B\u8DEF\u4E0A\u4E86</p></li></ol><blockquote><p>\u6570\u636E\u554A\u514B\u5229\u592B\u5170\u6492\u98DE\u673A\u62C9\u5361\u4E0A\u6253\u98DE\u673A\u554A\u770B\u5230\u4E86\u5730\u65B9\u3002</p></blockquote></div></details><p></p>\n ",
|
|
9
9
|
newHtml: "\n <p style=\"text-align: center;\">\u53D1\u751F\u5927\u89E3\u653E\u4E86\u5361<a target=\"_blank\" type=\"text\" href=\"https://www.baidu.com\" title=\"\u4E0A\u6253\u98DE\u673A\">\u4E0A\u6253\u98DE\u673A</a>\uFF0C\u53D1\u751F\u7B80<a target=\"_blank\" type=\"icon\" href=\"\u4E8B\u5B9E\u4E0A\" title=\"\u5355\u5FEB\u4E50\u98DE\u673A\">\u5355\u5FEB\u4E50\u98DE\u673A</a>\u963F\u65AF\u5229\u5EB7\u53D1\u7684\u3002</p><p><img src=\"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg\" width=\"540\"></p><div data-tag=\"attachment\" url=\"\" title=\"\" size=\"0\" data-url=\"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg\" data-title=\"images.jpeg\" data-size=\"6.81 KB\"></div><div data-tag=\"attachment\" url=\"\" title=\"\" size=\"0\" data-url=\"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg\" data-title=\"monkeycode-1.20.vsix\" data-size=\"27.94 MB\"></div><video class=\"video-wrapper\" src=\"http://vjs.zencdn.net/v/oceans.mp4\" controls=\"true\" width=\"1017\"></video><audio class=\"audio-wrapper\" src=\"http://vjs.zencdn.net/v/oceans.mp4\" title=\"\u6536\u62FE\u6536\u62FE\" poster=\"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg\" controls=\"true\"></audio><details class=\"cq-details\" open=\"\"><summary>\u5C31\u53D1\u751F\u7684\u5FEB\u4E50\u98DE\u673A\u963F\u91CC\u65AF\u987F</summary><div data-type=\"detailsContent\"><p>\u6C60 <s>W1111F</s> \u662F\u4E00\u6B3E\u7B80\u5355\u9AD8<span style=\"color: rgb(216, 164, 127);\">\u6548\u7684 </span><span style=\"color: rgb(254, 69, 69);\">Web</span><span style=\"color: rgb(216, 164, 127);\"> \u5E94</span>\u7528\u9632<span style=\"background-color: rgb(179, 229, 252);\">\u706B\uFF0C\u80FD</span>\u6709\u6548\u9632\u5FA1 S<sup>QL</sup> \u6CE8\u5165\u3001X<sub>SS</sub> \u7B49\u5404\u7C7B Web \u653B\u51FB\uFF0C\u63D0\u4F9B\u8BBF\u95EE\u9891\u7387\u9650\u5236\u3001\u4EBA\u673A\u9A8C\u8BC1\u3001\u52A8<code>\u6001\u9632\u6536\u62FE\u6536\u62FE\u7B49</code>\u529F\u80FD\u3002<em>\u5168</em><a target=\"_blank\" type=\"icon\" href=\"https://www.baidu.com\" title=\"\u7403\u88C5\u673A\">\u7403\u88C5\u673A</a><em>\u8D85 30 \u4E07\u53F0</em>\uFF0C<u>\u65E5\u5747</u>\u5904\u7406 300 \u4EBF\u6B21<u>\u8BF7</u>\u6C42\u3002<span data-latex=\"x ^ 2 + y ^ 2=1\" data-type=\"inline-math\"></span></p><div class=\"tableWrapper\"><table style=\"min-width: 537px;\"><colgroup><col style=\"min-width: 100px;\"><col style=\"width: 237px;\"><col style=\"min-width: 100px;\"><col style=\"min-width: 100px;\"></colgroup><tbody><tr class=\"table-row\"><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>1</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\" colwidth=\"237\"><p>2</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>3</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>4</p></th></tr><tr class=\"table-row\"><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>5</p></td><td colspan=\"1\" rowspan=\"1\" colwidth=\"237\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>6</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>7sfadfsaf</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p></p></td></tr><tr class=\"table-row\"><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>9</p></td><td colspan=\"1\" rowspan=\"1\" colwidth=\"237\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>10</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>11</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p><strong>12</strong></p></td></tr></tbody></table></div><a target=\"_blank\" type=\"block\" href=\"http://localhost:8000/components/editor\" title=\"\u89E3\u653E\u6492\u7684\u8DEF\u53E3\">\u89E3\u653E\u6492\u7684\u8DEF\u53E3</a><div data-latex=\"x ^ 2 + y ^ 2 + z^2=1\" data-type=\"block-math\"></div><pre><code>export const DetailsExtension = CustomDetails.configure({\n persist: true,\n openClassName: 'is-open',\n HTMLAttributes: {\n class: 'cq-details',\n },\n});\n\nexport const SummaryExtension = DetailsSummary.configure({\n HTMLAttributes: {\n class: 'cq-details',\n },\n});\n\nconst persist = true;\n\nexport const ContentExtension = DetailsContent.configure({\n persist,\n});</code></pre><ol class=\"ordered-list\" data-type=\"orderedList\"><li><p>\u8FD9\u662F<s>\u5217\u8868</s></p></li><li><p>\u793A<span style=\"color: rgb(254, 69, 69);\">\u4F8B\u793A\u4F8B\u8DEF</span>\u4E0A\u4E86</p></li><li><p>\u6CD5\u7532\u8054\u8D5B\u80AF\u5FB7\u57FA</p></li></ol><blockquote><p>\u6570\u636E\u554A\u514B<strong>\u5229\u592B\u5170\u6492\u98DE\u673A\u62C9\u5361\u4E0A</strong>\u6253\u98DE\u673A\u554A\u770B\u5230\u4E86\u5730\u65B9</p></blockquote></div></details><p></p>\n "
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { Box, Divider, Stack } from '@mui/material';
|
|
8
8
|
import React, { useEffect, useState } from 'react';
|
|
9
|
-
import { ArrowGoBackLineIcon, ArrowGoForwardLineIcon, BoldIcon, DoubleQuotesLIcon, ItalicIcon, LinkIcon, MenuFold2FillIcon, StrikethroughIcon, Table2Icon, UnderlineIcon } from "../component/Icons";
|
|
9
|
+
import { ArrowGoBackLineIcon, ArrowGoForwardLineIcon, BoldIcon, DoubleQuotesLIcon, Information2LineIcon, ItalicIcon, LinkIcon, MenuFold2FillIcon, StrikethroughIcon, Table2Icon, UnderlineIcon } from "../component/Icons";
|
|
10
10
|
import { EditorAlignSelect, EditorCode, EditorFontBgColor, EditorFontColor, EditorFontSize, EditorHeading, EditorInsert, EditorListSelect, EditorMath, EditorMore, EditorScript, EditorVerticalAlignSelect, ToolbarItem } from "../component/Toolbar";
|
|
11
11
|
var EditorToolbar = function EditorToolbar(_ref) {
|
|
12
12
|
var editor = _ref.editor,
|
|
@@ -23,7 +23,8 @@ var EditorToolbar = function EditorToolbar(_ref) {
|
|
|
23
23
|
subscript: false,
|
|
24
24
|
details: false,
|
|
25
25
|
table: false,
|
|
26
|
-
link: false
|
|
26
|
+
link: false,
|
|
27
|
+
alert: false
|
|
27
28
|
}),
|
|
28
29
|
_useState2 = _slicedToArray(_useState, 2),
|
|
29
30
|
active = _useState2[0],
|
|
@@ -41,7 +42,8 @@ var EditorToolbar = function EditorToolbar(_ref) {
|
|
|
41
42
|
subscript: editor.isActive('subscript'),
|
|
42
43
|
details: editor.isActive('details'),
|
|
43
44
|
table: editor.isActive('table'),
|
|
44
|
-
link: editor.isActive('link')
|
|
45
|
+
link: editor.isActive('link'),
|
|
46
|
+
alert: editor.isActive('alert')
|
|
45
47
|
});
|
|
46
48
|
};
|
|
47
49
|
useEffect(function () {
|
|
@@ -136,6 +138,20 @@ var EditorToolbar = function EditorToolbar(_ref) {
|
|
|
136
138
|
return editor.chain().focus().toggleBlockquote().run();
|
|
137
139
|
},
|
|
138
140
|
className: active.quote ? 'tool-active' : ''
|
|
141
|
+
}), /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
142
|
+
tip: '警告提示',
|
|
143
|
+
icon: /*#__PURE__*/React.createElement(Information2LineIcon, {
|
|
144
|
+
sx: {
|
|
145
|
+
fontSize: '1rem'
|
|
146
|
+
}
|
|
147
|
+
}),
|
|
148
|
+
onClick: function onClick() {
|
|
149
|
+
return editor.chain().focus().toggleAlert({
|
|
150
|
+
type: 'icon',
|
|
151
|
+
variant: 'info'
|
|
152
|
+
}).run();
|
|
153
|
+
},
|
|
154
|
+
className: active.alert ? 'tool-active' : ''
|
|
139
155
|
}), /*#__PURE__*/React.createElement(Divider, {
|
|
140
156
|
orientation: "vertical",
|
|
141
157
|
flexItem: true,
|
|
@@ -150,7 +150,7 @@ var SelectionText = function SelectionText(_ref) {
|
|
|
150
150
|
},
|
|
151
151
|
className: active.subscript ? "tool-active" : ""
|
|
152
152
|
}), /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
153
|
-
tip: "\u4EE3\u7801",
|
|
153
|
+
tip: "\u884C\u5185\u4EE3\u7801",
|
|
154
154
|
icon: /*#__PURE__*/React.createElement(CodeLineIcon, {
|
|
155
155
|
sx: {
|
|
156
156
|
fontSize: '1rem'
|