reactjs-tiptap-editor 0.4.2 → 1.0.1
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/lib/ActionMenuButton-BKOg7hkq.js +38 -0
- package/lib/ActionMenuButton-DLQyd_gx.cjs +1 -0
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.d.cts +27 -39
- package/lib/Attachment.d.ts +27 -39
- package/lib/Attachment.js +129 -99
- package/lib/Blockquote.cjs +3 -3
- package/lib/Blockquote.d.cts +27 -39
- package/lib/Blockquote.d.ts +27 -39
- package/lib/Blockquote.js +50 -22
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +27 -39
- package/lib/Bold.d.ts +27 -39
- package/lib/Bold.js +48 -20
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +27 -39
- package/lib/BulletList.d.ts +27 -39
- package/lib/BulletList.js +38 -9
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +27 -39
- package/lib/Clear.d.ts +27 -39
- package/lib/Clear.js +32 -6
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +27 -39
- package/lib/Code.d.ts +27 -39
- package/lib/Code.js +53 -25
- package/lib/CodeBlock.cjs +35 -35
- package/lib/CodeBlock.d.cts +27 -39
- package/lib/CodeBlock.d.ts +27 -39
- package/lib/CodeBlock.js +605 -590
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +28 -40
- package/lib/CodeView.d.ts +28 -40
- package/lib/CodeView.js +49 -21
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +31 -39
- package/lib/Color.d.ts +31 -39
- package/lib/Color.js +123 -79
- package/lib/Column.cjs +1 -0
- package/lib/{Document.d.cts → Column.d.cts} +33 -42
- package/lib/{Document.d.ts → Column.d.ts} +33 -42
- package/lib/Column.js +217 -0
- package/lib/{Drawer-CaAfmqNo.js → Drawer-DZ5jvmrX.js} +404 -394
- package/lib/Drawer-SRhwOc6T.cjs +1 -0
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +27 -39
- package/lib/Drawer.d.ts +27 -39
- package/lib/Drawer.js +6 -5
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +27 -44
- package/lib/Emoji.d.ts +27 -44
- package/lib/Emoji.js +377 -392
- package/lib/Excalidraw-DwBRXEtC.js +345 -0
- package/lib/Excalidraw-ZN3DQvDC.cjs +1 -0
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +27 -39
- package/lib/Excalidraw.d.ts +27 -39
- package/lib/Excalidraw.js +6 -4
- package/lib/ExportPdf.cjs +5 -5
- package/lib/ExportPdf.d.cts +27 -39
- package/lib/ExportPdf.d.ts +27 -39
- package/lib/ExportPdf.js +60 -32
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +28 -40
- package/lib/ExportWord.d.ts +28 -40
- package/lib/ExportWord.js +84 -21
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +41 -42
- package/lib/FontFamily.d.ts +41 -42
- package/lib/FontFamily.js +72 -74
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +38 -42
- package/lib/FontSize.d.ts +38 -42
- package/lib/FontSize.js +72 -64
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +41 -39
- package/lib/Heading.d.ts +41 -39
- package/lib/Heading.js +91 -73
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +31 -39
- package/lib/Highlight.d.ts +31 -39
- package/lib/Highlight.js +150 -19
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +29 -39
- package/lib/History.d.ts +29 -39
- package/lib/History.js +976 -53
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +27 -39
- package/lib/HorizontalRule.d.ts +27 -39
- package/lib/HorizontalRule.js +97 -17
- package/lib/Icon-DUpv2cI6.cjs +1 -0
- package/lib/Icon-jKs8Hr6p.js +11 -0
- package/lib/Iframe-CmXkEqOd.js +431 -0
- package/lib/Iframe-Cvca2G7X.cjs +1 -0
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +26 -45
- package/lib/Iframe.d.ts +26 -45
- package/lib/Iframe.js +6 -4
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +27 -40
- package/lib/Image.d.ts +27 -40
- package/lib/Image.js +848 -5
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +28 -42
- package/lib/ImageGif.d.ts +28 -42
- package/lib/ImageGif.js +424 -5
- package/lib/ImportWord.cjs +48 -48
- package/lib/ImportWord.d.cts +28 -40
- package/lib/ImportWord.d.ts +28 -40
- package/lib/ImportWord.js +2759 -2751
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +27 -39
- package/lib/Indent.d.ts +27 -39
- package/lib/Indent.js +97 -27
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +27 -39
- package/lib/Italic.d.ts +27 -39
- package/lib/Italic.js +47 -19
- package/lib/Katex-DsYXsjSS.js +2740 -0
- package/lib/Katex-XfrNne6U.cjs +4 -0
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +27 -39
- package/lib/Katex.d.ts +27 -39
- package/lib/Katex.js +5 -196
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +29 -45
- package/lib/LineHeight.d.ts +29 -45
- package/lib/LineHeight.js +71 -112
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +28 -42
- package/lib/Link.d.ts +28 -42
- package/lib/Link.js +3 -3
- package/lib/LinkEditBlock-BZenZq-Z.cjs +5 -0
- package/lib/LinkEditBlock-CB8yIffE.js +1241 -0
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.d.cts +24 -39
- package/lib/Mention.d.ts +24 -39
- package/lib/Mention.js +112 -124
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.d.cts +27 -39
- package/lib/Mermaid.d.ts +27 -39
- package/lib/Mermaid.js +177 -165
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +42 -41
- package/lib/MoreMark.d.ts +42 -41
- package/lib/MoreMark.js +125 -55
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +27 -39
- package/lib/OrderedList.d.ts +27 -39
- package/lib/OrderedList.js +37 -9
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +27 -42
- package/lib/SearchAndReplace.d.ts +27 -42
- package/lib/SearchAndReplace.js +221 -197
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +39 -46
- package/lib/SlashCommand.d.ts +39 -46
- package/lib/SlashCommand.js +235 -249
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +27 -39
- package/lib/Strike.d.ts +27 -39
- package/lib/Strike.js +39 -11
- package/lib/Table-B1j1Ebmh.cjs +9 -0
- package/lib/Table-Db8TcQX8.js +1984 -0
- package/lib/Table.cjs +1 -9
- package/lib/Table.d.cts +28 -42
- package/lib/Table.d.ts +28 -42
- package/lib/Table.js +3 -558
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +27 -39
- package/lib/TaskList.d.ts +27 -39
- package/lib/TaskList.js +38 -10
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +40 -39
- package/lib/TextAlign.d.ts +40 -39
- package/lib/TextAlign.js +108 -101
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +56 -39
- package/lib/TextDirection.d.ts +56 -39
- package/lib/TextDirection.js +105 -112
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +27 -39
- package/lib/TextUnderline.d.ts +27 -39
- package/lib/TextUnderline.js +46 -18
- package/lib/{Twitter-BFULyqdR.js → Twitter-CXmmjz9R.js} +536 -498
- package/lib/Twitter-CtVTIWJW.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +27 -39
- package/lib/Twitter.d.ts +27 -39
- package/lib/Twitter.js +5 -4
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +27 -39
- package/lib/Video.d.ts +27 -39
- package/lib/Video.js +261 -4
- package/lib/_commonjsHelpers-BItOPCY9.js +28 -0
- package/lib/_commonjsHelpers-BTDuMlIz.cjs +1 -0
- package/lib/bubble.cjs +2 -0
- package/lib/{bubble-extra.d.cts → bubble.d.cts} +53 -54
- package/lib/{bubble-extra.d.ts → bubble.d.ts} +53 -54
- package/lib/bubble.js +1925 -0
- package/lib/button-B12K7BJ4.cjs +1 -0
- package/lib/button-DXMsXUEn.js +43 -0
- package/lib/clsx-C11secjj.cjs +1 -0
- package/lib/clsx-OuTLNxxd.js +16 -0
- package/lib/delete-node-CosiBes5.cjs +1 -0
- package/lib/delete-node-IyVmiRbI.js +22 -0
- package/lib/dialog-CaCS-W5S.cjs +1 -0
- package/lib/dialog-PtQivpHS.js +100 -0
- package/lib/dom-dataset-BqoJhJXt.cjs +1 -0
- package/lib/dom-dataset-CIEeltF6.js +47 -0
- package/lib/dropdown-menu-BPp2Z_U-.js +136 -0
- package/lib/dropdown-menu-CdSm4emp.cjs +1 -0
- package/lib/file-BLas99n7.js +43 -0
- package/lib/file-i7e4nQY2.cjs +1 -0
- package/lib/floating-ui.dom-U1vPFQ5f.js +1151 -0
- package/lib/floating-ui.dom-VCrc58uF.cjs +1 -0
- package/lib/icons-Cllpys39.js +362 -0
- package/lib/icons-CqHjeW5T.cjs +1 -0
- package/lib/index-BH4bc3jN.cjs +33 -0
- package/lib/index-BPfVXs5_.js +2380 -0
- package/lib/index-Bnmd0WvY.js +1631 -0
- package/lib/{index-Ch6dBBad.js → index-CBce_TWY.js} +40 -42
- package/lib/{index-5iBZLua9.cjs → index-D-5U8dY8.cjs} +8 -8
- package/lib/{index-ByurDDMv.js → index-D2TUfKkC.js} +2 -2
- package/lib/index-DV5kbgRU.cjs +1 -0
- package/lib/{index-LmrOdnen.js → index-DYkucCoF.js} +396 -495
- package/lib/index-Dfmm6FTT.cjs +1 -0
- package/lib/index-DnWWK9F_.js +6374 -0
- package/lib/index-DzcKxutn.js +632 -0
- package/lib/index-DzvuNTxo.cjs +4 -0
- package/lib/{index-BeCTd5v2.cjs → index-N--9MohJ.cjs} +1 -1
- package/lib/index-RfTlOzIr.cjs +22 -0
- package/lib/index.cjs +132 -1
- package/lib/index.d.cts +29 -280
- package/lib/index.d.ts +29 -280
- package/lib/index.js +243 -2
- package/lib/input-_ECRfn3Y.cjs +1 -0
- package/lib/input-wJ9PDEzZ.js +21 -0
- package/lib/isNumber-ClPupm7P.cjs +1 -0
- package/lib/isNumber-fpLGS0AZ.js +15 -0
- package/lib/label-BkgAe7IY.cjs +1 -0
- package/lib/label-CGdLYWv7.js +19 -0
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +5405 -57
- package/lib/locale-bundle.d.ts +5405 -57
- package/lib/locale-bundle.js +9 -7
- package/lib/popover-BgmUNMHj.cjs +1 -0
- package/lib/popover-CAuEW0Mr.js +23 -0
- package/lib/separator-CuBW_w98.js +328 -0
- package/lib/separator-DRIrVZ2N.cjs +1 -0
- package/lib/store-DX599H5W.js +10 -0
- package/lib/store-WStcMOiW.cjs +1 -0
- package/lib/style.css +1 -1
- package/lib/switch-CnLJ7Y-b.cjs +1 -0
- package/lib/switch-Coix_FA1.js +27 -0
- package/lib/tabs-B5mVSN1I.js +46 -0
- package/lib/tabs-BoLCMcCI.cjs +1 -0
- package/lib/textarea-B-6zTKQz.cjs +1 -0
- package/lib/{textarea-aPtytkDx.js → textarea-DUUM1jZd.js} +1 -1
- package/lib/theme-B7aAsK_T.js +15 -0
- package/lib/theme-D8_cxGqB.cjs +1 -0
- package/lib/throttle-CdwDrFpn.js +249 -0
- package/lib/throttle-qX7Yjtsg.cjs +1 -0
- package/lib/toggle-Cdp4IT2U.js +85 -0
- package/lib/toggle-D41PzQLJ.cjs +1 -0
- package/lib/tooltip-BuEiE96N.cjs +1 -0
- package/lib/tooltip-CopwsU8q.js +23 -0
- package/lib/updatePosition-8Sdem5jb.cjs +1 -0
- package/lib/updatePosition-BPmcE0YD.js +215 -0
- package/lib/use-toast-Bz3QCOtE.cjs +1 -0
- package/lib/use-toast-Crf7-q5H.js +98 -0
- package/lib/useButtonProps-BsEd4zYM.js +141 -0
- package/lib/useButtonProps-C6Vpn190.cjs +1 -0
- package/package.json +22 -105
- package/lib/ActionMenuButton-CYdM1xx5.cjs +0 -1
- package/lib/ActionMenuButton-DKRF6oa0.js +0 -33
- package/lib/BaseKit.cjs +0 -3
- package/lib/BaseKit.d.cts +0 -481
- package/lib/BaseKit.d.ts +0 -481
- package/lib/BaseKit.js +0 -132
- package/lib/Document.cjs +0 -1
- package/lib/Document.js +0 -9
- package/lib/Drawer-CdvCMSzN.cjs +0 -1
- package/lib/Excalidraw-BbMQhNvs.cjs +0 -1
- package/lib/Excalidraw-CVWz2Vyn.js +0 -290
- package/lib/FormatPainter.cjs +0 -1
- package/lib/FormatPainter.d.cts +0 -372
- package/lib/FormatPainter.d.ts +0 -372
- package/lib/FormatPainter.js +0 -76
- package/lib/ListItem.cjs +0 -1
- package/lib/ListItem.d.cts +0 -290
- package/lib/ListItem.d.ts +0 -290
- package/lib/ListItem.js +0 -7
- package/lib/MultiColumn.cjs +0 -1
- package/lib/MultiColumn.d.cts +0 -294
- package/lib/MultiColumn.d.ts +0 -294
- package/lib/MultiColumn.js +0 -8
- package/lib/RichTextEditor-CxvwGvQG.cjs +0 -142
- package/lib/RichTextEditor-DGcKEUGr.js +0 -22166
- package/lib/Selection.cjs +0 -1
- package/lib/Selection.d.cts +0 -289
- package/lib/Selection.d.ts +0 -289
- package/lib/Selection.js +0 -25
- package/lib/SubAndSuperScript.cjs +0 -1
- package/lib/SubAndSuperScript.d.cts +0 -377
- package/lib/SubAndSuperScript.d.ts +0 -377
- package/lib/SubAndSuperScript.js +0 -43
- package/lib/TableOfContent.cjs +0 -1
- package/lib/TableOfContent.d.cts +0 -291
- package/lib/TableOfContent.d.ts +0 -291
- package/lib/TableOfContent.js +0 -185
- package/lib/TextBubble.cjs +0 -1
- package/lib/TextBubble.d.cts +0 -362
- package/lib/TextBubble.d.ts +0 -362
- package/lib/TextBubble.js +0 -133
- package/lib/TrailingNode.cjs +0 -1
- package/lib/TrailingNode.d.cts +0 -297
- package/lib/TrailingNode.d.ts +0 -297
- package/lib/TrailingNode.js +0 -41
- package/lib/Twitter-Cutpkh3h.cjs +0 -1
- package/lib/bubble-extra.cjs +0 -2
- package/lib/bubble-extra.js +0 -631
- package/lib/dom-dataset-_6-diIRQ.cjs +0 -33
- package/lib/dom-dataset-lYeH6gfI.js +0 -2361
- package/lib/index-6D1J-A-o.cjs +0 -1
- package/lib/index-B96Cclrj.cjs +0 -3
- package/lib/index-BBz7Nmv9.js +0 -55
- package/lib/index-CUogRI7j.cjs +0 -1
- package/lib/index-DF2Lp4HZ.cjs +0 -100
- package/lib/index-D_L6n8O8.js +0 -76
- package/lib/index-Dbvi-Bvh.cjs +0 -1
- package/lib/index-DpCrt7xs.cjs +0 -1
- package/lib/index-DsAX1Vq8.cjs +0 -1
- package/lib/index-Dy4DlW9o.js +0 -12
- package/lib/index-J3jHHZ4d.js +0 -200
- package/lib/index-VvXaaKe3.js +0 -898
- package/lib/index-kbO3iWqL.js +0 -13432
- package/lib/textarea-DFo_aXnj.cjs +0 -1
package/lib/CodeView.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-RfTlOzIr.cjs"),n=require("react/jsx-runtime"),v=require("./toggle-D41PzQLJ.cjs");require("react");require("./index-DV5kbgRU.cjs");const r=require("./useButtonProps-C6Vpn190.cjs");function w(){const e=r.useButtonProps(a.name),{icon:t=void 0,tooltip:o=void 0,shortcutKeys:i=void 0,tooltipOptions:d={},action:s=void 0,isActive:u=void 0}=(e==null?void 0:e.componentProps)??{},{dataState:l,disabled:c,update:p}=r.useToggleActive(u),g=()=>{c||s&&(s(),p())};return e?n.jsx(v.ActionButton,{action:g,dataState:l,disabled:c,icon:t,shortcutKeys:i,tooltip:o,tooltipOptions:d}):n.jsx(n.Fragment,{})}const a=m.Extension.create({name:"codeView",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:o}){return{componentProps:{action:()=>{t.commands.toggleCodeView()},isActive:()=>t.storage.codeView.isActive,disabled:!1,icon:"Html",tooltip:o("editor.codeView.tooltip")||"View HTML Code",customClass:"tiptap-code-view-button"}}}}},addStorage(){return{isActive:!1,originalContent:""}},addCommands(){return{toggleCodeView:()=>({editor:e})=>{const t=e.storage.codeView.isActive;if(t)e.commands.setContent(e.getText());else{const o=e.getHTML();e.storage.codeView.originalContent=o;const i=o.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");e.commands.setContent(`<div class="tiptap-code-view-wrapper">${i}</div>`)}return e.storage.codeView.isActive=!t,!0}}}});exports.CodeView=a;exports.RichTextCodeView=w;
|
package/lib/CodeView.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
|
2
2
|
import { Extension } from '@tiptap/core';
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Represents the ButtonView function.
|
|
@@ -56,7 +57,7 @@ declare interface ButtonViewReturnComponentSlots {
|
|
|
56
57
|
|
|
57
58
|
export declare const CodeView: Extension<CodeViewOptions, any>;
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
declare interface CodeViewOptions extends GeneralOptions<CodeViewOptions> {
|
|
60
61
|
isCodeViewMode?: boolean;
|
|
61
62
|
}
|
|
62
63
|
|
|
@@ -76,6 +77,8 @@ declare interface GeneralOptions<T> {
|
|
|
76
77
|
shortcutKeys?: string[] | string[][];
|
|
77
78
|
}
|
|
78
79
|
|
|
80
|
+
export declare function RichTextCodeView(): JSX.Element;
|
|
81
|
+
|
|
79
82
|
export { }
|
|
80
83
|
|
|
81
84
|
|
|
@@ -109,6 +112,27 @@ declare module '@tiptap/core' {
|
|
|
109
112
|
}
|
|
110
113
|
|
|
111
114
|
|
|
115
|
+
declare module '@tiptap/core' {
|
|
116
|
+
interface Storage {
|
|
117
|
+
color: ColorStorage;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
declare module '@tiptap/core' {
|
|
123
|
+
interface Commands<ReturnType> {
|
|
124
|
+
columns: {
|
|
125
|
+
insertColumns: (attrs?: {
|
|
126
|
+
cols: number;
|
|
127
|
+
}) => ReturnType;
|
|
128
|
+
addColBefore: () => ReturnType;
|
|
129
|
+
addColAfter: () => ReturnType;
|
|
130
|
+
deleteCol: () => ReturnType;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
|
|
112
136
|
declare module '@tiptap/core' {
|
|
113
137
|
interface Commands<ReturnType> {
|
|
114
138
|
drawer: {
|
|
@@ -140,7 +164,7 @@ declare module '@tiptap/core' {
|
|
|
140
164
|
declare module '@tiptap/core' {
|
|
141
165
|
interface Commands<ReturnType> {
|
|
142
166
|
exportWord: {
|
|
143
|
-
exportToWord: () => ReturnType;
|
|
167
|
+
exportToWord: (docState: any) => ReturnType;
|
|
144
168
|
};
|
|
145
169
|
}
|
|
146
170
|
}
|
|
@@ -165,10 +189,8 @@ declare module '@tiptap/core' {
|
|
|
165
189
|
|
|
166
190
|
|
|
167
191
|
declare module '@tiptap/core' {
|
|
168
|
-
interface
|
|
169
|
-
|
|
170
|
-
setPainter: (marks: Mark[]) => ReturnType;
|
|
171
|
-
};
|
|
192
|
+
interface Storage {
|
|
193
|
+
highlight: HighlightStorage;
|
|
172
194
|
}
|
|
173
195
|
}
|
|
174
196
|
|
|
@@ -253,16 +275,6 @@ declare module '@tiptap/core' {
|
|
|
253
275
|
}
|
|
254
276
|
|
|
255
277
|
|
|
256
|
-
declare module '@tiptap/core' {
|
|
257
|
-
interface Commands<ReturnType> {
|
|
258
|
-
lineHeight: {
|
|
259
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
260
|
-
unsetLineHeight: () => ReturnType;
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
|
|
266
278
|
declare module '@tiptap/core' {
|
|
267
279
|
interface Commands<ReturnType> {
|
|
268
280
|
mermaid: {
|
|
@@ -273,20 +285,6 @@ declare module '@tiptap/core' {
|
|
|
273
285
|
}
|
|
274
286
|
|
|
275
287
|
|
|
276
|
-
declare module '@tiptap/core' {
|
|
277
|
-
interface Commands<ReturnType> {
|
|
278
|
-
columns: {
|
|
279
|
-
insertColumns: (attrs?: {
|
|
280
|
-
cols: number;
|
|
281
|
-
}) => ReturnType;
|
|
282
|
-
addColBefore: () => ReturnType;
|
|
283
|
-
addColAfter: () => ReturnType;
|
|
284
|
-
deleteCol: () => ReturnType;
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
|
|
290
288
|
declare module '@tiptap/core' {
|
|
291
289
|
interface Commands<ReturnType> {
|
|
292
290
|
search: {
|
|
@@ -310,16 +308,6 @@ declare module '@tiptap/core' {
|
|
|
310
308
|
}
|
|
311
309
|
|
|
312
310
|
|
|
313
|
-
declare module '@tiptap/core' {
|
|
314
|
-
interface Commands<ReturnType> {
|
|
315
|
-
tableOfContents: {
|
|
316
|
-
setTableOfContents: () => ReturnType;
|
|
317
|
-
removeTableOfContents: () => ReturnType;
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
|
|
323
311
|
declare module '@tiptap/core' {
|
|
324
312
|
interface Commands<ReturnType> {
|
|
325
313
|
twitter: {
|
package/lib/CodeView.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
|
2
2
|
import { Extension } from '@tiptap/core';
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Represents the ButtonView function.
|
|
@@ -56,7 +57,7 @@ declare interface ButtonViewReturnComponentSlots {
|
|
|
56
57
|
|
|
57
58
|
export declare const CodeView: Extension<CodeViewOptions, any>;
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
declare interface CodeViewOptions extends GeneralOptions<CodeViewOptions> {
|
|
60
61
|
isCodeViewMode?: boolean;
|
|
61
62
|
}
|
|
62
63
|
|
|
@@ -76,6 +77,8 @@ declare interface GeneralOptions<T> {
|
|
|
76
77
|
shortcutKeys?: string[] | string[][];
|
|
77
78
|
}
|
|
78
79
|
|
|
80
|
+
export declare function RichTextCodeView(): JSX.Element;
|
|
81
|
+
|
|
79
82
|
export { }
|
|
80
83
|
|
|
81
84
|
|
|
@@ -109,6 +112,27 @@ declare module '@tiptap/core' {
|
|
|
109
112
|
}
|
|
110
113
|
|
|
111
114
|
|
|
115
|
+
declare module '@tiptap/core' {
|
|
116
|
+
interface Storage {
|
|
117
|
+
color: ColorStorage;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
declare module '@tiptap/core' {
|
|
123
|
+
interface Commands<ReturnType> {
|
|
124
|
+
columns: {
|
|
125
|
+
insertColumns: (attrs?: {
|
|
126
|
+
cols: number;
|
|
127
|
+
}) => ReturnType;
|
|
128
|
+
addColBefore: () => ReturnType;
|
|
129
|
+
addColAfter: () => ReturnType;
|
|
130
|
+
deleteCol: () => ReturnType;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
|
|
112
136
|
declare module '@tiptap/core' {
|
|
113
137
|
interface Commands<ReturnType> {
|
|
114
138
|
drawer: {
|
|
@@ -140,7 +164,7 @@ declare module '@tiptap/core' {
|
|
|
140
164
|
declare module '@tiptap/core' {
|
|
141
165
|
interface Commands<ReturnType> {
|
|
142
166
|
exportWord: {
|
|
143
|
-
exportToWord: () => ReturnType;
|
|
167
|
+
exportToWord: (docState: any) => ReturnType;
|
|
144
168
|
};
|
|
145
169
|
}
|
|
146
170
|
}
|
|
@@ -165,10 +189,8 @@ declare module '@tiptap/core' {
|
|
|
165
189
|
|
|
166
190
|
|
|
167
191
|
declare module '@tiptap/core' {
|
|
168
|
-
interface
|
|
169
|
-
|
|
170
|
-
setPainter: (marks: Mark[]) => ReturnType;
|
|
171
|
-
};
|
|
192
|
+
interface Storage {
|
|
193
|
+
highlight: HighlightStorage;
|
|
172
194
|
}
|
|
173
195
|
}
|
|
174
196
|
|
|
@@ -253,16 +275,6 @@ declare module '@tiptap/core' {
|
|
|
253
275
|
}
|
|
254
276
|
|
|
255
277
|
|
|
256
|
-
declare module '@tiptap/core' {
|
|
257
|
-
interface Commands<ReturnType> {
|
|
258
|
-
lineHeight: {
|
|
259
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
260
|
-
unsetLineHeight: () => ReturnType;
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
|
|
266
278
|
declare module '@tiptap/core' {
|
|
267
279
|
interface Commands<ReturnType> {
|
|
268
280
|
mermaid: {
|
|
@@ -273,20 +285,6 @@ declare module '@tiptap/core' {
|
|
|
273
285
|
}
|
|
274
286
|
|
|
275
287
|
|
|
276
|
-
declare module '@tiptap/core' {
|
|
277
|
-
interface Commands<ReturnType> {
|
|
278
|
-
columns: {
|
|
279
|
-
insertColumns: (attrs?: {
|
|
280
|
-
cols: number;
|
|
281
|
-
}) => ReturnType;
|
|
282
|
-
addColBefore: () => ReturnType;
|
|
283
|
-
addColAfter: () => ReturnType;
|
|
284
|
-
deleteCol: () => ReturnType;
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
|
|
290
288
|
declare module '@tiptap/core' {
|
|
291
289
|
interface Commands<ReturnType> {
|
|
292
290
|
search: {
|
|
@@ -310,16 +308,6 @@ declare module '@tiptap/core' {
|
|
|
310
308
|
}
|
|
311
309
|
|
|
312
310
|
|
|
313
|
-
declare module '@tiptap/core' {
|
|
314
|
-
interface Commands<ReturnType> {
|
|
315
|
-
tableOfContents: {
|
|
316
|
-
setTableOfContents: () => ReturnType;
|
|
317
|
-
removeTableOfContents: () => ReturnType;
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
|
|
323
311
|
declare module '@tiptap/core' {
|
|
324
312
|
interface Commands<ReturnType> {
|
|
325
313
|
twitter: {
|
package/lib/CodeView.js
CHANGED
|
@@ -1,22 +1,49 @@
|
|
|
1
|
-
import { E as
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { E as l } from "./index-DnWWK9F_.js";
|
|
2
|
+
import { jsx as c, Fragment as g } from "react/jsx-runtime";
|
|
3
|
+
import { A as u } from "./toggle-Cdp4IT2U.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "./index-BPfVXs5_.js";
|
|
6
|
+
import { u as v, a as w } from "./useButtonProps-BsEd4zYM.js";
|
|
7
|
+
function H() {
|
|
8
|
+
const t = v(C.name), {
|
|
9
|
+
icon: e = void 0,
|
|
10
|
+
tooltip: o = void 0,
|
|
11
|
+
shortcutKeys: i = void 0,
|
|
12
|
+
tooltipOptions: a = {},
|
|
13
|
+
action: n = void 0,
|
|
14
|
+
isActive: r = void 0
|
|
15
|
+
} = (t == null ? void 0 : t.componentProps) ?? {}, { dataState: p, disabled: s, update: d } = w(r), m = () => {
|
|
16
|
+
s || n && (n(), d());
|
|
17
|
+
};
|
|
18
|
+
return t ? /* @__PURE__ */ c(
|
|
19
|
+
u,
|
|
20
|
+
{
|
|
21
|
+
action: m,
|
|
22
|
+
dataState: p,
|
|
23
|
+
disabled: s,
|
|
24
|
+
icon: e,
|
|
25
|
+
shortcutKeys: i,
|
|
26
|
+
tooltip: o,
|
|
27
|
+
tooltipOptions: a
|
|
28
|
+
}
|
|
29
|
+
) : /* @__PURE__ */ c(g, {});
|
|
30
|
+
}
|
|
31
|
+
const C = /* @__PURE__ */ l.create({
|
|
4
32
|
name: "codeView",
|
|
5
33
|
//@ts-expect-error
|
|
6
34
|
addOptions() {
|
|
7
|
-
var
|
|
35
|
+
var t;
|
|
8
36
|
return {
|
|
9
|
-
...(
|
|
10
|
-
button({ editor:
|
|
37
|
+
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
38
|
+
button({ editor: e, t: o }) {
|
|
11
39
|
return {
|
|
12
|
-
component: s,
|
|
13
40
|
componentProps: {
|
|
14
41
|
action: () => {
|
|
15
|
-
|
|
42
|
+
e.commands.toggleCodeView();
|
|
16
43
|
},
|
|
17
|
-
isActive: () =>
|
|
44
|
+
isActive: () => e.storage.codeView.isActive,
|
|
18
45
|
disabled: !1,
|
|
19
|
-
icon: "
|
|
46
|
+
icon: "Html",
|
|
20
47
|
tooltip: o("editor.codeView.tooltip") || "View HTML Code",
|
|
21
48
|
customClass: "tiptap-code-view-button"
|
|
22
49
|
}
|
|
@@ -32,23 +59,24 @@ const r = /* @__PURE__ */ i.create({
|
|
|
32
59
|
},
|
|
33
60
|
addCommands() {
|
|
34
61
|
return {
|
|
35
|
-
toggleCodeView: () => ({ editor:
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
|
|
62
|
+
toggleCodeView: () => ({ editor: t }) => {
|
|
63
|
+
const e = t.storage.codeView.isActive;
|
|
64
|
+
if (e)
|
|
65
|
+
t.commands.setContent(t.getText());
|
|
39
66
|
else {
|
|
40
|
-
const o =
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
`<div class="tiptap-code-view-wrapper">${
|
|
67
|
+
const o = t.getHTML();
|
|
68
|
+
t.storage.codeView.originalContent = o;
|
|
69
|
+
const i = o.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
70
|
+
t.commands.setContent(
|
|
71
|
+
`<div class="tiptap-code-view-wrapper">${i}</div>`
|
|
45
72
|
);
|
|
46
73
|
}
|
|
47
|
-
return
|
|
74
|
+
return t.storage.codeView.isActive = !e, !0;
|
|
48
75
|
}
|
|
49
76
|
};
|
|
50
77
|
}
|
|
51
78
|
});
|
|
52
79
|
export {
|
|
53
|
-
|
|
80
|
+
C as CodeView,
|
|
81
|
+
H as RichTextCodeView
|
|
54
82
|
};
|
package/lib/Color.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-N--9MohJ.cjs"),t=require("react/jsx-runtime"),d=require("react"),g=require("./toggle-D41PzQLJ.cjs"),v=require("./separator-DRIrVZ2N.cjs");require("./index-DV5kbgRU.cjs");const j=require("./Icon-DUpv2cI6.cjs"),h=require("./useButtonProps-C6Vpn190.cjs");function m({fill:e}){return t.jsx("svg",{height:"18px",version:"1.1",viewBox:"0 0 240 240",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:1,children:t.jsx("g",{transform:"translate(0.000000, 0.500000)",children:t.jsxs("g",{transform:"translate(39.000000, 17.353553)",children:[t.jsx("path",{d:"M11,201.146447 L167,201.146447 C173.075132,201.146447 178,206.071314 178,212.146447 C178,218.221579 173.075132,223.146447 167,223.146447 L11,223.146447 C4.92486775,223.146447 7.43989126e-16,218.221579 0,212.146447 C-7.43989126e-16,206.071314 4.92486775,201.146447 11,201.146447 Z",fill:typeof e=="string"?e:"#000",fillRule:"evenodd"}),t.jsx("path",{d:"M72.3425855,16.8295583 C75.799482,7.50883712 86.1577877,2.75526801 95.4785089,6.21216449 C100.284516,7.99463061 104.096358,11.7387855 105.968745,16.4968188 L106.112518,16.8745422 L159.385152,161.694068 C161.291848,166.877345 158.635655,172.624903 153.452378,174.531599 C148.358469,176.405421 142.719567,173.872338 140.716873,168.864661 L140.614848,168.598825 L89.211,28.86 L37.3759214,168.623816 C35.4885354,173.712715 29.8981043,176.351047 24.7909589,174.617647 L24.5226307,174.522368 C19.4337312,172.634982 16.7953993,167.044551 18.5287999,161.937406 L18.6240786,161.669077 L72.3425855,16.8295583 Z",fill:"currentColor",fillRule:"nonzero"}),t.jsx("path",{d:"M121,103.146447 C126.522847,103.146447 131,107.623599 131,113.146447 C131,118.575687 126.673329,122.994378 121.279905,123.142605 L121,123.146447 L55,123.146447 C49.4771525,123.146447 45,118.669294 45,113.146447 C45,107.717207 49.3266708,103.298515 54.7200952,103.150288 L55,103.146447 L121,103.146447 Z",fill:"currentColor",fillRule:"nonzero"})]})})})})}function L(){const e=h.useButtonProps(C.name),{tooltip:o=void 0,isActive:s=void 0,defaultColor:r=void 0,colors:n,action:i}=(e==null?void 0:e.componentProps)??{},{disabled:l,dataState:c}=h.useActive(s),[f,u]=d.useState(r);d.useEffect(()=>{u(c)},[c]);function x(a){l||i&&(i==null||i(a),u(a))}return e?t.jsx(v.ColorPicker,{colors:n,disabled:l,onChange:x,value:f,children:t.jsx(g.ActionButton,{disabled:l,tooltip:o,children:t.jsxs("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-gap-[4px] richtext-text-sm",children:[t.jsx(m,{fill:c}),t.jsx(j.IconComponent,{className:"!richtext-h-3 !richtext-w-3 richtext-text-zinc-500",name:"MenuDown"})]})})}):t.jsx(t.Fragment,{})}const C=p.Color.extend({addStorage(){return{currentColor:this.options.defaultColor||void 0}},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:o,t:s,extension:r}){return{componentProps:{colors:r.options.colors,defaultColor:r.options.defaultColor,action:n=>{if(typeof n=="string"){o.storage.color.currentColor=n,o.chain().focus().setColor(n).run();return}o.chain().focus().unsetColor().run()},isActive:()=>{const{color:n}=o.getAttributes("textStyle");return n},disabled:!1,shortcutKeys:r.options.shortcutKeys??["⇧","alt","C"],tooltip:s("editor.color.tooltip")}}}}},addKeyboardShortcuts(){var e;return{...(e=this.parent)==null?void 0:e.call(this),"Alt-Shift-c":()=>{const o=this.storage.currentColor||this.options.defaultColor;if(!o){const{color:r}=this.editor.getAttributes("textStyle");return r?this.editor.chain().focus().unsetColor().run():!1}return this.editor.isActive("textStyle",{color:o})?this.editor.chain().focus().unsetColor().run():this.editor.chain().focus().setColor(o).run()}}}});exports.Color=C;exports.RichTextColor=L;
|
package/lib/Color.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ColorOptions as ColorOptions_2 } from '@tiptap/extension-text-style';
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
|
3
3
|
import { Extension } from '@tiptap/core';
|
|
4
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Represents the ButtonView function.
|
|
@@ -68,6 +69,10 @@ export declare interface ColorOptions extends ColorOptions_2, GeneralOptions<Col
|
|
|
68
69
|
defaultColor?: string;
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
export declare interface ColorStorage {
|
|
73
|
+
currentColor?: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
71
76
|
/**
|
|
72
77
|
* Represents the general options for Tiptap extensions.
|
|
73
78
|
*/
|
|
@@ -84,6 +89,8 @@ declare interface GeneralOptions<T> {
|
|
|
84
89
|
shortcutKeys?: string[] | string[][];
|
|
85
90
|
}
|
|
86
91
|
|
|
92
|
+
export declare function RichTextColor(): JSX.Element;
|
|
93
|
+
|
|
87
94
|
export { }
|
|
88
95
|
|
|
89
96
|
|
|
@@ -117,6 +124,27 @@ declare module '@tiptap/core' {
|
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
|
|
127
|
+
declare module '@tiptap/core' {
|
|
128
|
+
interface Storage {
|
|
129
|
+
color: ColorStorage;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
declare module '@tiptap/core' {
|
|
135
|
+
interface Commands<ReturnType> {
|
|
136
|
+
columns: {
|
|
137
|
+
insertColumns: (attrs?: {
|
|
138
|
+
cols: number;
|
|
139
|
+
}) => ReturnType;
|
|
140
|
+
addColBefore: () => ReturnType;
|
|
141
|
+
addColAfter: () => ReturnType;
|
|
142
|
+
deleteCol: () => ReturnType;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
120
148
|
declare module '@tiptap/core' {
|
|
121
149
|
interface Commands<ReturnType> {
|
|
122
150
|
drawer: {
|
|
@@ -148,7 +176,7 @@ declare module '@tiptap/core' {
|
|
|
148
176
|
declare module '@tiptap/core' {
|
|
149
177
|
interface Commands<ReturnType> {
|
|
150
178
|
exportWord: {
|
|
151
|
-
exportToWord: () => ReturnType;
|
|
179
|
+
exportToWord: (docState: any) => ReturnType;
|
|
152
180
|
};
|
|
153
181
|
}
|
|
154
182
|
}
|
|
@@ -173,10 +201,8 @@ declare module '@tiptap/core' {
|
|
|
173
201
|
|
|
174
202
|
|
|
175
203
|
declare module '@tiptap/core' {
|
|
176
|
-
interface
|
|
177
|
-
|
|
178
|
-
setPainter: (marks: Mark[]) => ReturnType;
|
|
179
|
-
};
|
|
204
|
+
interface Storage {
|
|
205
|
+
highlight: HighlightStorage;
|
|
180
206
|
}
|
|
181
207
|
}
|
|
182
208
|
|
|
@@ -261,16 +287,6 @@ declare module '@tiptap/core' {
|
|
|
261
287
|
}
|
|
262
288
|
|
|
263
289
|
|
|
264
|
-
declare module '@tiptap/core' {
|
|
265
|
-
interface Commands<ReturnType> {
|
|
266
|
-
lineHeight: {
|
|
267
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
268
|
-
unsetLineHeight: () => ReturnType;
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
|
|
274
290
|
declare module '@tiptap/core' {
|
|
275
291
|
interface Commands<ReturnType> {
|
|
276
292
|
mermaid: {
|
|
@@ -281,20 +297,6 @@ declare module '@tiptap/core' {
|
|
|
281
297
|
}
|
|
282
298
|
|
|
283
299
|
|
|
284
|
-
declare module '@tiptap/core' {
|
|
285
|
-
interface Commands<ReturnType> {
|
|
286
|
-
columns: {
|
|
287
|
-
insertColumns: (attrs?: {
|
|
288
|
-
cols: number;
|
|
289
|
-
}) => ReturnType;
|
|
290
|
-
addColBefore: () => ReturnType;
|
|
291
|
-
addColAfter: () => ReturnType;
|
|
292
|
-
deleteCol: () => ReturnType;
|
|
293
|
-
};
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
|
|
298
300
|
declare module '@tiptap/core' {
|
|
299
301
|
interface Commands<ReturnType> {
|
|
300
302
|
search: {
|
|
@@ -318,16 +320,6 @@ declare module '@tiptap/core' {
|
|
|
318
320
|
}
|
|
319
321
|
|
|
320
322
|
|
|
321
|
-
declare module '@tiptap/core' {
|
|
322
|
-
interface Commands<ReturnType> {
|
|
323
|
-
tableOfContents: {
|
|
324
|
-
setTableOfContents: () => ReturnType;
|
|
325
|
-
removeTableOfContents: () => ReturnType;
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
|
|
331
323
|
declare module '@tiptap/core' {
|
|
332
324
|
interface Commands<ReturnType> {
|
|
333
325
|
twitter: {
|
package/lib/Color.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ColorOptions as ColorOptions_2 } from '@tiptap/extension-text-style';
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
|
3
3
|
import { Extension } from '@tiptap/core';
|
|
4
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Represents the ButtonView function.
|
|
@@ -68,6 +69,10 @@ export declare interface ColorOptions extends ColorOptions_2, GeneralOptions<Col
|
|
|
68
69
|
defaultColor?: string;
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
export declare interface ColorStorage {
|
|
73
|
+
currentColor?: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
71
76
|
/**
|
|
72
77
|
* Represents the general options for Tiptap extensions.
|
|
73
78
|
*/
|
|
@@ -84,6 +89,8 @@ declare interface GeneralOptions<T> {
|
|
|
84
89
|
shortcutKeys?: string[] | string[][];
|
|
85
90
|
}
|
|
86
91
|
|
|
92
|
+
export declare function RichTextColor(): JSX.Element;
|
|
93
|
+
|
|
87
94
|
export { }
|
|
88
95
|
|
|
89
96
|
|
|
@@ -117,6 +124,27 @@ declare module '@tiptap/core' {
|
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
|
|
127
|
+
declare module '@tiptap/core' {
|
|
128
|
+
interface Storage {
|
|
129
|
+
color: ColorStorage;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
declare module '@tiptap/core' {
|
|
135
|
+
interface Commands<ReturnType> {
|
|
136
|
+
columns: {
|
|
137
|
+
insertColumns: (attrs?: {
|
|
138
|
+
cols: number;
|
|
139
|
+
}) => ReturnType;
|
|
140
|
+
addColBefore: () => ReturnType;
|
|
141
|
+
addColAfter: () => ReturnType;
|
|
142
|
+
deleteCol: () => ReturnType;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
120
148
|
declare module '@tiptap/core' {
|
|
121
149
|
interface Commands<ReturnType> {
|
|
122
150
|
drawer: {
|
|
@@ -148,7 +176,7 @@ declare module '@tiptap/core' {
|
|
|
148
176
|
declare module '@tiptap/core' {
|
|
149
177
|
interface Commands<ReturnType> {
|
|
150
178
|
exportWord: {
|
|
151
|
-
exportToWord: () => ReturnType;
|
|
179
|
+
exportToWord: (docState: any) => ReturnType;
|
|
152
180
|
};
|
|
153
181
|
}
|
|
154
182
|
}
|
|
@@ -173,10 +201,8 @@ declare module '@tiptap/core' {
|
|
|
173
201
|
|
|
174
202
|
|
|
175
203
|
declare module '@tiptap/core' {
|
|
176
|
-
interface
|
|
177
|
-
|
|
178
|
-
setPainter: (marks: Mark[]) => ReturnType;
|
|
179
|
-
};
|
|
204
|
+
interface Storage {
|
|
205
|
+
highlight: HighlightStorage;
|
|
180
206
|
}
|
|
181
207
|
}
|
|
182
208
|
|
|
@@ -261,16 +287,6 @@ declare module '@tiptap/core' {
|
|
|
261
287
|
}
|
|
262
288
|
|
|
263
289
|
|
|
264
|
-
declare module '@tiptap/core' {
|
|
265
|
-
interface Commands<ReturnType> {
|
|
266
|
-
lineHeight: {
|
|
267
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
268
|
-
unsetLineHeight: () => ReturnType;
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
|
|
274
290
|
declare module '@tiptap/core' {
|
|
275
291
|
interface Commands<ReturnType> {
|
|
276
292
|
mermaid: {
|
|
@@ -281,20 +297,6 @@ declare module '@tiptap/core' {
|
|
|
281
297
|
}
|
|
282
298
|
|
|
283
299
|
|
|
284
|
-
declare module '@tiptap/core' {
|
|
285
|
-
interface Commands<ReturnType> {
|
|
286
|
-
columns: {
|
|
287
|
-
insertColumns: (attrs?: {
|
|
288
|
-
cols: number;
|
|
289
|
-
}) => ReturnType;
|
|
290
|
-
addColBefore: () => ReturnType;
|
|
291
|
-
addColAfter: () => ReturnType;
|
|
292
|
-
deleteCol: () => ReturnType;
|
|
293
|
-
};
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
|
|
298
300
|
declare module '@tiptap/core' {
|
|
299
301
|
interface Commands<ReturnType> {
|
|
300
302
|
search: {
|
|
@@ -318,16 +320,6 @@ declare module '@tiptap/core' {
|
|
|
318
320
|
}
|
|
319
321
|
|
|
320
322
|
|
|
321
|
-
declare module '@tiptap/core' {
|
|
322
|
-
interface Commands<ReturnType> {
|
|
323
|
-
tableOfContents: {
|
|
324
|
-
setTableOfContents: () => ReturnType;
|
|
325
|
-
removeTableOfContents: () => ReturnType;
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
|
|
331
323
|
declare module '@tiptap/core' {
|
|
332
324
|
interface Commands<ReturnType> {
|
|
333
325
|
twitter: {
|