reactjs-tiptap-editor-pro 0.2.31 → 0.2.33
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/ColorPicker-MEAh4MhG.js +28181 -0
- package/lib/ColorPicker-ZncOwjAP.cjs +142 -0
- package/lib/extension-bundle.cjs +133 -0
- package/lib/extension-bundle.d.cts +947 -0
- package/lib/extension-bundle.d.ts +947 -0
- package/lib/extension-bundle.js +23921 -0
- package/lib/index.cjs +140 -0
- package/lib/index.d.cts +513 -0
- package/lib/index.d.ts +513 -0
- package/lib/index.js +3700 -0
- package/lib/locale-bundle-DiqW5jwb.cjs +1 -0
- package/lib/locale-bundle-DxCAtRDI.js +1487 -0
- package/lib/locale-bundle.cjs +1 -0
- package/lib/locale-bundle.d.cts +1140 -0
- package/lib/locale-bundle.d.ts +1140 -0
- package/lib/locale-bundle.js +9 -0
- package/lib/lucide-react-BFZtMawV.js +30462 -0
- package/lib/lucide-react-CMPhLW1m.cjs +7851 -0
- package/lib/style.css +1 -0
- package/package.json +58 -5
- package/src/components/ActionButton.tsx +0 -103
- package/src/components/ActionMenuButton.tsx +0 -76
- package/src/components/BubbleMenu.tsx +0 -93
- package/src/components/CharactorCount.tsx +0 -50
- package/src/components/ColorPicker.tsx +0 -272
- package/src/components/RichTextEditor.tsx +0 -212
- package/src/components/SizeSetter/SizeSetter.tsx +0 -102
- package/src/components/Toolbar.tsx +0 -108
- package/src/components/icons/Activity.tsx +0 -19
- package/src/components/icons/Animas.tsx +0 -24
- package/src/components/icons/AspectRatio.tsx +0 -13
- package/src/components/icons/Blockquote.tsx +0 -17
- package/src/components/icons/ColumnAddLeft.tsx +0 -7
- package/src/components/icons/ColumnAddRight.tsx +0 -7
- package/src/components/icons/DeleteColumn.tsx +0 -26
- package/src/components/icons/DeleteRow.tsx +0 -26
- package/src/components/icons/Direction.tsx +0 -7
- package/src/components/icons/Excalidraw.tsx +0 -7
- package/src/components/icons/ExportPdf.tsx +0 -8
- package/src/components/icons/ExportWord.tsx +0 -24
- package/src/components/icons/FileWordOutline.tsx +0 -13
- package/src/components/icons/Flag.tsx +0 -19
- package/src/components/icons/Food.tsx +0 -20
- package/src/components/icons/GIfIcon.tsx +0 -10
- package/src/components/icons/Icon.tsx +0 -30
- package/src/components/icons/ImportWord.tsx +0 -23
- package/src/components/icons/LeftToRight.tsx +0 -7
- package/src/components/icons/LineHeight.tsx +0 -13
- package/src/components/icons/MenuDown.tsx +0 -24
- package/src/components/icons/Mermaid.tsx +0 -13
- package/src/components/icons/NoFill.tsx +0 -7
- package/src/components/icons/Object.tsx +0 -24
- package/src/components/icons/RightToLeft.tsx +0 -7
- package/src/components/icons/SizeL.tsx +0 -9
- package/src/components/icons/SizeM.tsx +0 -13
- package/src/components/icons/SizeS.tsx +0 -13
- package/src/components/icons/Symbol.tsx +0 -19
- package/src/components/icons/Travel.tsx +0 -24
- package/src/components/icons/Twitter.tsx +0 -7
- package/src/components/icons/icons.ts +0 -212
- package/src/components/icons/index.ts +0 -12
- package/src/components/index.ts +0 -9
- package/src/components/menus/bubble.ts +0 -395
- package/src/components/menus/components/BubbleMenuContent.tsx +0 -15
- package/src/components/menus/components/BubbleMenuDrawer.tsx +0 -128
- package/src/components/menus/components/BubbleMenuExcalidraw.tsx +0 -91
- package/src/components/menus/components/BubbleMenuIframe.tsx +0 -143
- package/src/components/menus/components/BubbleMenuKatex.tsx +0 -136
- package/src/components/menus/components/BubbleMenuLink.tsx +0 -99
- package/src/components/menus/components/BubbleMenuMedia.tsx +0 -235
- package/src/components/menus/components/BubbleMenuMermaid.tsx +0 -128
- package/src/components/menus/components/BubbleMenuText.tsx +0 -102
- package/src/components/menus/components/BubbleMenuTwitter.tsx +0 -91
- package/src/components/menus/components/ColumnsBubbleMenu.tsx +0 -59
- package/src/components/menus/components/ContentMenu.tsx +0 -396
- package/src/components/menus/components/TableBubbleMenu.tsx +0 -362
- package/src/components/menus/index.ts +0 -7
- package/src/components/ui/button.tsx +0 -56
- package/src/components/ui/checkbox.tsx +0 -30
- package/src/components/ui/dialog.tsx +0 -128
- package/src/components/ui/dropdown-menu.tsx +0 -203
- package/src/components/ui/emoji-picker.tsx +0 -166
- package/src/components/ui/index.ts +0 -14
- package/src/components/ui/input.tsx +0 -25
- package/src/components/ui/label.tsx +0 -26
- package/src/components/ui/popover.tsx +0 -31
- package/src/components/ui/select.tsx +0 -162
- package/src/components/ui/separator.tsx +0 -31
- package/src/components/ui/switch.tsx +0 -29
- package/src/components/ui/tabs.tsx +0 -55
- package/src/components/ui/textarea.tsx +0 -24
- package/src/components/ui/toast.tsx +0 -129
- package/src/components/ui/toaster.tsx +0 -44
- package/src/components/ui/toggle.tsx +0 -45
- package/src/components/ui/tooltip.tsx +0 -30
- package/src/components/ui/use-toast.ts +0 -197
- package/src/constants/index.ts +0 -223
- package/src/constants/resetCSS.ts +0 -139
- package/src/extension-bundle.ts +0 -2
- package/src/extensions/Attachment/Attachment.ts +0 -144
- package/src/extensions/Attachment/components/NodeViewAttachment/FileIcon.tsx +0 -69
- package/src/extensions/Attachment/components/NodeViewAttachment/FileIconString.ts +0 -28
- package/src/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.tsx +0 -155
- package/src/extensions/Attachment/components/NodeViewAttachment/index.module.scss +0 -23
- package/src/extensions/Attachment/index.ts +0 -1
- package/src/extensions/BaseKit.ts +0 -253
- package/src/extensions/Blockquote/Blockquote.ts +0 -31
- package/src/extensions/Blockquote/index.ts +0 -1
- package/src/extensions/Bold/Bold.ts +0 -26
- package/src/extensions/Bold/index.ts +0 -1
- package/src/extensions/BulletList/BulletList.ts +0 -28
- package/src/extensions/BulletList/index.ts +0 -1
- package/src/extensions/Clear/Clear.ts +0 -24
- package/src/extensions/Clear/index.ts +0 -1
- package/src/extensions/Code/Code.ts +0 -26
- package/src/extensions/Code/index.ts +0 -1
- package/src/extensions/CodeBlock/CodeBlock.ts +0 -54
- package/src/extensions/CodeBlock/components/CodeBlockActiveButton.tsx +0 -66
- package/src/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock.tsx +0 -89
- package/src/extensions/CodeBlock/components/NodeViewCodeBlock/index.module.scss +0 -81
- package/src/extensions/CodeBlock/highlighter.ts +0 -132
- package/src/extensions/CodeBlock/index.ts +0 -1
- package/src/extensions/CodeBlock/shiki-plugin.ts +0 -213
- package/src/extensions/Color/Color.ts +0 -52
- package/src/extensions/Color/components/ColorActionButton.tsx +0 -104
- package/src/extensions/Color/index.ts +0 -1
- package/src/extensions/Document/Document.ts +0 -8
- package/src/extensions/Document/index.ts +0 -1
- package/src/extensions/Drawer/Drawer.ts +0 -177
- package/src/extensions/Drawer/components/ControlDrawer/ControlDrawer.module.scss +0 -85
- package/src/extensions/Drawer/components/ControlDrawer/ControlDrawer.tsx +0 -598
- package/src/extensions/Drawer/components/ControlDrawer/icon.tsx +0 -500
- package/src/extensions/Drawer/components/DrawerActiveButton.tsx +0 -239
- package/src/extensions/Drawer/components/EditDrawerBlock.tsx +0 -238
- package/src/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer.tsx +0 -260
- package/src/extensions/Drawer/index.ts +0 -1
- package/src/extensions/Emoji/Emoji.ts +0 -146
- package/src/extensions/Emoji/components/EmojiList/EmojiList.tsx +0 -103
- package/src/extensions/Emoji/components/EmojiList/emojis.ts +0 -1858
- package/src/extensions/Emoji/components/EmojiPicker/EmojiPicker.tsx +0 -61
- package/src/extensions/Emoji/index.ts +0 -1
- package/src/extensions/Excalidraw/Excalidraw.ts +0 -123
- package/src/extensions/Excalidraw/components/ExcalidrawActiveButton.tsx +0 -138
- package/src/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw.tsx +0 -178
- package/src/extensions/Excalidraw/components/NodeViewExcalidraw/index.module.scss +0 -43
- package/src/extensions/Excalidraw/index.ts +0 -1
- package/src/extensions/ExportPdf/ExportPdf.ts +0 -25
- package/src/extensions/ExportPdf/index.ts +0 -1
- package/src/extensions/ExportWord/ExportWord.ts +0 -87
- package/src/extensions/ExportWord/index.ts +0 -1
- package/src/extensions/FontFamily/FontFamily.ts +0 -64
- package/src/extensions/FontFamily/components/FontFamilyButton.tsx +0 -97
- package/src/extensions/FontFamily/index.ts +0 -1
- package/src/extensions/FontSize/FontSize.ts +0 -119
- package/src/extensions/FontSize/components/FontSizeMenuButton.tsx +0 -84
- package/src/extensions/FontSize/index.ts +0 -1
- package/src/extensions/FormatPainter/FormatPainter.ts +0 -121
- package/src/extensions/FormatPainter/index.ts +0 -1
- package/src/extensions/Heading/Heading.ts +0 -57
- package/src/extensions/Heading/components/HeadingButton.tsx +0 -96
- package/src/extensions/Heading/index.ts +0 -1
- package/src/extensions/Highlight/Highlight.ts +0 -36
- package/src/extensions/Highlight/components/HighlightActionButton.tsx +0 -108
- package/src/extensions/Highlight/index.ts +0 -1
- package/src/extensions/History/History.ts +0 -39
- package/src/extensions/History/components/HistoryActionButton.tsx +0 -74
- package/src/extensions/History/index.ts +0 -1
- package/src/extensions/HorizontalRule/HorizontalRule.ts +0 -42
- package/src/extensions/HorizontalRule/index.ts +0 -1
- package/src/extensions/Iframe/Iframe.ts +0 -140
- package/src/extensions/Iframe/components/IframeNodeView.tsx +0 -92
- package/src/extensions/Iframe/components/index.module.scss +0 -40
- package/src/extensions/Iframe/embed.ts +0 -487
- package/src/extensions/Iframe/index.ts +0 -1
- package/src/extensions/Image/Image.ts +0 -303
- package/src/extensions/Image/components/ActionImageButton.tsx +0 -186
- package/src/extensions/Image/components/ImageCropper.tsx +0 -198
- package/src/extensions/Image/components/ImageView.tsx +0 -271
- package/src/extensions/Image/index.ts +0 -1
- package/src/extensions/Image/store.ts +0 -15
- package/src/extensions/ImageGif/ImageGif.ts +0 -176
- package/src/extensions/ImageGif/components/ImageGifActionButton.tsx +0 -138
- package/src/extensions/ImageGif/components/ImageGifView.tsx +0 -260
- package/src/extensions/ImageGif/index.ts +0 -1
- package/src/extensions/ImportWord/ImportWord.ts +0 -52
- package/src/extensions/ImportWord/components/ImportWordButton.tsx +0 -151
- package/src/extensions/ImportWord/index.ts +0 -1
- package/src/extensions/Indent/Indent.ts +0 -110
- package/src/extensions/Indent/index.ts +0 -1
- package/src/extensions/Italic/Italic.ts +0 -29
- package/src/extensions/Italic/index.ts +0 -1
- package/src/extensions/Katex/Katex.ts +0 -109
- package/src/extensions/Katex/components/KatexActiveButton.tsx +0 -117
- package/src/extensions/Katex/components/KatexWrapper.tsx +0 -53
- package/src/extensions/Katex/index.ts +0 -1
- package/src/extensions/LineHeight/LineHeight.ts +0 -76
- package/src/extensions/LineHeight/components/LineHeightDropdown.tsx +0 -93
- package/src/extensions/LineHeight/index.ts +0 -1
- package/src/extensions/Link/Link.ts +0 -92
- package/src/extensions/Link/components/LinkEditBlock.tsx +0 -110
- package/src/extensions/Link/components/LinkEditPopover.tsx +0 -46
- package/src/extensions/Link/components/LinkViewBlock.tsx +0 -54
- package/src/extensions/Link/index.ts +0 -1
- package/src/extensions/ListItem/ListItem.ts +0 -1
- package/src/extensions/ListItem/index.ts +0 -1
- package/src/extensions/Mention/Mention.ts +0 -100
- package/src/extensions/Mention/components/NodeViewMentionList/NodeViewMentionList.tsx +0 -94
- package/src/extensions/Mention/components/NodeViewMentionList/index.module.scss +0 -38
- package/src/extensions/Mention/index.ts +0 -1
- package/src/extensions/Mermaid/Mermaid.ts +0 -177
- package/src/extensions/Mermaid/components/EditMermaidBlock.tsx +0 -155
- package/src/extensions/Mermaid/components/MermaidActiveButton.tsx +0 -151
- package/src/extensions/Mermaid/components/NodeViewMermaid/NodeViewMermaid.tsx +0 -260
- package/src/extensions/Mermaid/index.ts +0 -1
- package/src/extensions/MoreMark/MoreMark.ts +0 -102
- package/src/extensions/MoreMark/components/ActionMoreButton.tsx +0 -97
- package/src/extensions/MoreMark/index.ts +0 -1
- package/src/extensions/MultiColumn/Column.ts +0 -36
- package/src/extensions/MultiColumn/MultiColumn.ts +0 -111
- package/src/extensions/MultiColumn/components/ColumnActionButton.ts +0 -22
- package/src/extensions/MultiColumn/index.ts +0 -3
- package/src/extensions/OrderedList/OrderedList.ts +0 -28
- package/src/extensions/OrderedList/index.ts +0 -1
- package/src/extensions/SearchAndReplace/SearchAndReplace.ts +0 -395
- package/src/extensions/SearchAndReplace/components/SearchAndReplaceButton.tsx +0 -190
- package/src/extensions/SearchAndReplace/index.ts +0 -1
- package/src/extensions/Selection/Selection.ts +0 -32
- package/src/extensions/Selection/index.ts +0 -1
- package/src/extensions/SlashCommand/SlashCommand.ts +0 -255
- package/src/extensions/SlashCommand/components/CommandsList.tsx +0 -180
- package/src/extensions/SlashCommand/groups.ts +0 -183
- package/src/extensions/SlashCommand/index.ts +0 -1
- package/src/extensions/SlashCommand/types.ts +0 -24
- package/src/extensions/Strike/Strike.ts +0 -26
- package/src/extensions/Strike/index.ts +0 -1
- package/src/extensions/Subscript/Subscript.ts +0 -88
- package/src/extensions/Subscript/index.ts +0 -1
- package/src/extensions/Table/Cell.ts +0 -131
- package/src/extensions/Table/Header.ts +0 -93
- package/src/extensions/Table/Row.ts +0 -8
- package/src/extensions/Table/Table.ts +0 -60
- package/src/extensions/Table/cell-background.ts +0 -112
- package/src/extensions/Table/components/CreateTablePopover.tsx +0 -132
- package/src/extensions/Table/components/TableActionButton.tsx +0 -42
- package/src/extensions/Table/index.ts +0 -6
- package/src/extensions/Table/utils.ts +0 -352
- package/src/extensions/TableOfContent/TableOfContent.ts +0 -124
- package/src/extensions/TableOfContent/components/NodeViewTableOfContent.tsx +0 -116
- package/src/extensions/TableOfContent/components/TableOfContentActionButton.tsx +0 -27
- package/src/extensions/TableOfContent/components/index.module.scss +0 -40
- package/src/extensions/TableOfContent/index.ts +0 -1
- package/src/extensions/TaskList/TaskList.ts +0 -46
- package/src/extensions/TaskList/index.ts +0 -1
- package/src/extensions/TextAlign/TextAlign.ts +0 -68
- package/src/extensions/TextAlign/components/TextAlignMenuButton.tsx +0 -103
- package/src/extensions/TextAlign/index.ts +0 -1
- package/src/extensions/TextBubble/TextBubble.ts +0 -22
- package/src/extensions/TextBubble/components/TextDropdown.tsx +0 -146
- package/src/extensions/TextBubble/index.ts +0 -1
- package/src/extensions/TextDirection/TextDirection.ts +0 -97
- package/src/extensions/TextDirection/components/TextDirectionButton.tsx +0 -103
- package/src/extensions/TextDirection/index.ts +0 -1
- package/src/extensions/TrailingNode/TrailingNode.ts +0 -71
- package/src/extensions/TrailingNode/index.ts +0 -1
- package/src/extensions/Twitter/Twitter.ts +0 -161
- package/src/extensions/Twitter/components/FormEditLinkTwitter.tsx +0 -68
- package/src/extensions/Twitter/components/NodeViewTweet.tsx +0 -30
- package/src/extensions/Twitter/components/TwitterActiveButton.tsx +0 -41
- package/src/extensions/Twitter/index.ts +0 -1
- package/src/extensions/UnderLine/Underline.ts +0 -30
- package/src/extensions/UnderLine/index.ts +0 -1
- package/src/extensions/Video/Video.ts +0 -204
- package/src/extensions/Video/components/ActiveVideoButton.tsx +0 -191
- package/src/extensions/Video/index.ts +0 -1
- package/src/extensions/Video/store.ts +0 -15
- package/src/extensions/index.ts +0 -122
- package/src/hooks/useActive.tsx +0 -24
- package/src/hooks/useAttributes.tsx +0 -45
- package/src/hooks/useCopy.tsx +0 -20
- package/src/hooks/useEditorState.tsx +0 -23
- package/src/hooks/useExtension.tsx +0 -29
- package/src/index.ts +0 -8
- package/src/lib/utils.ts +0 -7
- package/src/locale-bundle.ts +0 -3
- package/src/locales/en.ts +0 -173
- package/src/locales/hu.ts +0 -173
- package/src/locales/index.tsx +0 -163
- package/src/locales/pt-br.ts +0 -173
- package/src/locales/vi.ts +0 -173
- package/src/locales/zh-cn.ts +0 -173
- package/src/plugins/DragHandle/index.ts +0 -375
- package/src/plugins/DragHandle/range.ts +0 -114
- package/src/plugins/DragHandle/utils.ts +0 -80
- package/src/plugins/image-upload.ts +0 -160
- package/src/store/ProviderRichText.tsx +0 -53
- package/src/store/editableEditor.ts +0 -15
- package/src/store/fast-context.tsx +0 -70
- package/src/store/store.ts +0 -35
- package/src/styles/ProseMirror.scss +0 -176
- package/src/styles/columns.scss +0 -23
- package/src/styles/editor.scss +0 -411
- package/src/styles/global.scss +0 -87
- package/src/styles/index.scss +0 -5
- package/src/styles/mention.scss +0 -6
- package/src/theme/theme.ts +0 -15
- package/src/types.ts +0 -271
- package/src/utils/_event.ts +0 -55
- package/src/utils/color.ts +0 -67
- package/src/utils/columns.ts +0 -142
- package/src/utils/customEvents/customEvents.ts +0 -18
- package/src/utils/customEvents/events.constant.ts +0 -11
- package/src/utils/delete-node.ts +0 -46
- package/src/utils/dom-dataset.ts +0 -121
- package/src/utils/download.ts +0 -17
- package/src/utils/dynamicCSS.ts +0 -192
- package/src/utils/editor-container-size.ts +0 -28
- package/src/utils/file.ts +0 -112
- package/src/utils/getRenderContainer.ts +0 -41
- package/src/utils/indent.ts +0 -99
- package/src/utils/is-mobile.ts +0 -57
- package/src/utils/json.ts +0 -18
- package/src/utils/line-height.ts +0 -109
- package/src/utils/lru-cache.ts +0 -145
- package/src/utils/mitt.ts +0 -114
- package/src/utils/node.ts +0 -92
- package/src/utils/pdf.ts +0 -72
- package/src/utils/plateform.ts +0 -49
- package/src/utils/shortId.ts +0 -5
- package/src/utils/storage.ts +0 -18
- package/src/utils/utils.ts +0 -71
- package/src/vite-env.d.ts +0 -3
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
import { AnyExtension } from '@tiptap/core';
|
|
2
|
+
import { BubbleMenu } from '@tiptap/react';
|
|
3
|
+
import { default as default_2 } from 'react';
|
|
4
|
+
import { Editor } from '@tiptap/react';
|
|
5
|
+
import { Editor as Editor_2 } from '@tiptap/core';
|
|
6
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
7
|
+
import { RefAttributes } from 'react';
|
|
8
|
+
import { TooltipContentProps } from '@radix-ui/react-tooltip';
|
|
9
|
+
import { UseEditorOptions } from '@tiptap/react';
|
|
10
|
+
|
|
11
|
+
declare interface ActionButtonProps {
|
|
12
|
+
icon?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
tooltip?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
shortcutKeys?: string[];
|
|
17
|
+
customClass?: string;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
tooltipOptions?: TooltipContentProps;
|
|
20
|
+
color?: string;
|
|
21
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
22
|
+
isActive?: ButtonViewReturnComponentProps['isActive'];
|
|
23
|
+
children?: default_2.ReactNode;
|
|
24
|
+
asChild?: boolean;
|
|
25
|
+
upload?: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { BubbleMenu }
|
|
29
|
+
|
|
30
|
+
declare interface BubbleMenuConfig {
|
|
31
|
+
/**
|
|
32
|
+
* @description Column menu hidden
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
hidden?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* custom menu actions
|
|
38
|
+
*/
|
|
39
|
+
actions?: ActionButtonProps[];
|
|
40
|
+
items?: string[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Represents the BubbleMenuProps.
|
|
45
|
+
*/
|
|
46
|
+
declare interface BubbleMenuProps {
|
|
47
|
+
columnConfig?: {
|
|
48
|
+
/**
|
|
49
|
+
* @description Column menu hidden
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
hidden?: boolean;
|
|
53
|
+
};
|
|
54
|
+
tableConfig?: BubbleMenuConfig;
|
|
55
|
+
floatingMenuConfig?: {
|
|
56
|
+
/**
|
|
57
|
+
* @description Floating menu hidden
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
hidden?: boolean;
|
|
61
|
+
};
|
|
62
|
+
linkConfig?: {
|
|
63
|
+
/**
|
|
64
|
+
* @description Link menu hidden
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
67
|
+
hidden?: boolean;
|
|
68
|
+
};
|
|
69
|
+
textConfig?: {
|
|
70
|
+
/**
|
|
71
|
+
* @description Text menu hidden
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
74
|
+
hidden?: boolean;
|
|
75
|
+
items?: string[];
|
|
76
|
+
};
|
|
77
|
+
imageConfig?: {
|
|
78
|
+
/**
|
|
79
|
+
* @description Image menu hidden
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
hidden?: boolean;
|
|
83
|
+
};
|
|
84
|
+
imageGifConfig?: {
|
|
85
|
+
/**
|
|
86
|
+
* @description Image menu hidden
|
|
87
|
+
* @default false
|
|
88
|
+
*/
|
|
89
|
+
hidden?: boolean;
|
|
90
|
+
};
|
|
91
|
+
videoConfig?: {
|
|
92
|
+
/**
|
|
93
|
+
* @description Video menu hidden
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
hidden?: boolean;
|
|
97
|
+
};
|
|
98
|
+
katexConfig?: {
|
|
99
|
+
/**
|
|
100
|
+
* @description katex menu hidden
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
hidden?: boolean;
|
|
104
|
+
};
|
|
105
|
+
excalidrawConfig?: {
|
|
106
|
+
/**
|
|
107
|
+
* @description excalidraw menu hidden
|
|
108
|
+
* @default false
|
|
109
|
+
*/
|
|
110
|
+
hidden?: boolean;
|
|
111
|
+
};
|
|
112
|
+
iframeConfig?: {
|
|
113
|
+
/**
|
|
114
|
+
* @description iframe menu hidden
|
|
115
|
+
* @default false
|
|
116
|
+
*/
|
|
117
|
+
hidden?: boolean;
|
|
118
|
+
};
|
|
119
|
+
mermaidConfig?: {
|
|
120
|
+
/**
|
|
121
|
+
* @description mermaid menu hidden
|
|
122
|
+
* @default false
|
|
123
|
+
*/
|
|
124
|
+
hidden?: boolean;
|
|
125
|
+
};
|
|
126
|
+
twitterConfig?: {
|
|
127
|
+
/**
|
|
128
|
+
* @description twitter menu hidden
|
|
129
|
+
* @default false
|
|
130
|
+
*/
|
|
131
|
+
hidden?: boolean;
|
|
132
|
+
};
|
|
133
|
+
drawerConfig?: {
|
|
134
|
+
/**
|
|
135
|
+
* @description twitter menu hidden
|
|
136
|
+
* @default false
|
|
137
|
+
*/
|
|
138
|
+
hidden?: boolean;
|
|
139
|
+
};
|
|
140
|
+
render?: (props: BubbleMenuRenderProps, dom: React.ReactNode) => React.ReactNode;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Represents the BubbleMenuRenderProps.
|
|
145
|
+
*/
|
|
146
|
+
declare interface BubbleMenuRenderProps {
|
|
147
|
+
editor: Editor;
|
|
148
|
+
disabled: boolean;
|
|
149
|
+
bubbleMenu: BubbleMenuProps;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Represents the props for the ButtonView component.
|
|
154
|
+
*/
|
|
155
|
+
declare interface ButtonViewReturnComponentProps {
|
|
156
|
+
/** Method triggered when action is performed */
|
|
157
|
+
action?: (value?: any) => void;
|
|
158
|
+
/** Whether it is in the active state */
|
|
159
|
+
isActive?: () => boolean;
|
|
160
|
+
/** Button icon */
|
|
161
|
+
icon?: any;
|
|
162
|
+
/** Text displayed on hover */
|
|
163
|
+
tooltip?: string;
|
|
164
|
+
[x: string]: any;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare const _default: ForwardRefExoticComponent<RichTextEditorProps & RefAttributes< {
|
|
168
|
+
editor: Editor_2 | null;
|
|
169
|
+
}>>;
|
|
170
|
+
export default _default;
|
|
171
|
+
|
|
172
|
+
export { Editor }
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Interface for RichTextEditor component props
|
|
176
|
+
*/
|
|
177
|
+
declare interface RichTextEditorProps {
|
|
178
|
+
/** Content of the editor */
|
|
179
|
+
content: string;
|
|
180
|
+
/** Extensions for the editor */
|
|
181
|
+
extensions: AnyExtension[];
|
|
182
|
+
/** Output format */
|
|
183
|
+
output: 'html' | 'json' | 'text';
|
|
184
|
+
/** Model value */
|
|
185
|
+
modelValue?: string | object;
|
|
186
|
+
/** Dark mode flag */
|
|
187
|
+
dark?: boolean;
|
|
188
|
+
/** Dense mode flag */
|
|
189
|
+
dense?: boolean;
|
|
190
|
+
/** Disabled flag */
|
|
191
|
+
disabled?: boolean;
|
|
192
|
+
/** Label for the editor */
|
|
193
|
+
label?: string;
|
|
194
|
+
/** Hide toolbar flag */
|
|
195
|
+
hideToolbar?: boolean;
|
|
196
|
+
/** Disable bubble menu flag */
|
|
197
|
+
disableBubble?: boolean;
|
|
198
|
+
/** Hide bubble menu flag */
|
|
199
|
+
hideBubble?: boolean;
|
|
200
|
+
/** Remove default wrapper flag */
|
|
201
|
+
removeDefaultWrapper?: boolean;
|
|
202
|
+
/** Maximum width */
|
|
203
|
+
maxWidth?: string | number;
|
|
204
|
+
/** Minimum height */
|
|
205
|
+
minHeight?: string | number;
|
|
206
|
+
/** Maximum height */
|
|
207
|
+
maxHeight?: string | number;
|
|
208
|
+
/** Content class */
|
|
209
|
+
contentClass?: string | string[] | Record<string, any>;
|
|
210
|
+
/** Content change callback */
|
|
211
|
+
onChangeContent?: (val: any) => void;
|
|
212
|
+
/** Bubble menu props */
|
|
213
|
+
bubbleMenu?: BubbleMenuProps;
|
|
214
|
+
/** Toolbar props */
|
|
215
|
+
toolbar?: ToolbarProps;
|
|
216
|
+
/** Use editor options */
|
|
217
|
+
useEditorOptions?: UseEditorOptions;
|
|
218
|
+
/** Use editor options */
|
|
219
|
+
resetCSS?: boolean;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Represents the ToolbarItemProps.
|
|
224
|
+
*/
|
|
225
|
+
declare interface ToolbarItemProps {
|
|
226
|
+
button: {
|
|
227
|
+
component: React.ComponentType<any>;
|
|
228
|
+
componentProps: Record<string, any>;
|
|
229
|
+
};
|
|
230
|
+
divider: boolean;
|
|
231
|
+
spacer: boolean;
|
|
232
|
+
type: string;
|
|
233
|
+
name: string;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
declare interface ToolbarProps {
|
|
237
|
+
render?: (props: ToolbarRenderProps, toolbarItems: ToolbarItemProps[], dom: any[], containerDom: (innerContent: React.ReactNode) => React.ReactNode) => React.ReactNode;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
declare interface ToolbarRenderProps {
|
|
241
|
+
editor: Editor;
|
|
242
|
+
disabled: boolean;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export { UseEditorOptions }
|
|
246
|
+
|
|
247
|
+
export declare function useEditorState(): UseEditorStateReturn;
|
|
248
|
+
|
|
249
|
+
export declare interface UseEditorStateReturn {
|
|
250
|
+
isReady: boolean;
|
|
251
|
+
editor: Editor_2 | null;
|
|
252
|
+
editorRef: React.MutableRefObject<{
|
|
253
|
+
editor: Editor_2 | null;
|
|
254
|
+
}>;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export { }
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
declare module '@tiptap/core' {
|
|
261
|
+
interface Commands<ReturnType> {
|
|
262
|
+
video: {
|
|
263
|
+
/**
|
|
264
|
+
* Add an video
|
|
265
|
+
*/
|
|
266
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
267
|
+
/**
|
|
268
|
+
* Update an video
|
|
269
|
+
*/
|
|
270
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
declare module '@tiptap/core' {
|
|
277
|
+
interface Commands<ReturnType> {
|
|
278
|
+
fontSize: {
|
|
279
|
+
/**
|
|
280
|
+
* Set the text font size. ex: "12px", "2em", or "small". Must be a valid
|
|
281
|
+
* CSS font-size
|
|
282
|
+
* (https://developer.mozilla.org/en-US/docs/Web/CSS/font-size).
|
|
283
|
+
*/
|
|
284
|
+
setFontSize: (fontSize: string) => ReturnType;
|
|
285
|
+
/**
|
|
286
|
+
* Unset the font size
|
|
287
|
+
*/
|
|
288
|
+
unsetFontSize: () => ReturnType;
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
declare module '@tiptap/core' {
|
|
295
|
+
interface Commands<ReturnType> {
|
|
296
|
+
indent: {
|
|
297
|
+
/**
|
|
298
|
+
* Set the indent attribute
|
|
299
|
+
*/
|
|
300
|
+
indent: () => ReturnType;
|
|
301
|
+
/**
|
|
302
|
+
* Set the outdent attribute
|
|
303
|
+
*/
|
|
304
|
+
outdent: () => ReturnType;
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
declare module '@tiptap/core' {
|
|
311
|
+
interface Commands<ReturnType> {
|
|
312
|
+
lineHeight: {
|
|
313
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
314
|
+
unsetLineHeight: () => ReturnType;
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
declare module '@tiptap/core' {
|
|
321
|
+
interface Commands<ReturnType> {
|
|
322
|
+
imageUpload: {
|
|
323
|
+
/**
|
|
324
|
+
* Add an image
|
|
325
|
+
*/
|
|
326
|
+
setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
327
|
+
/**
|
|
328
|
+
* Update an image
|
|
329
|
+
*/
|
|
330
|
+
updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
331
|
+
/**
|
|
332
|
+
* Set image alignment
|
|
333
|
+
*/
|
|
334
|
+
setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
declare module '@tiptap/core' {
|
|
341
|
+
interface Commands<ReturnType> {
|
|
342
|
+
painter: {
|
|
343
|
+
setPainter: (marks: Mark[]) => ReturnType;
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
declare module '@tiptap/core' {
|
|
350
|
+
interface Commands<ReturnType> {
|
|
351
|
+
columns: {
|
|
352
|
+
insertColumns: (attrs?: {
|
|
353
|
+
cols: number;
|
|
354
|
+
}) => ReturnType;
|
|
355
|
+
addColBefore: () => ReturnType;
|
|
356
|
+
addColAfter: () => ReturnType;
|
|
357
|
+
deleteCol: () => ReturnType;
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
declare module '@tiptap/core' {
|
|
364
|
+
interface Commands<ReturnType> {
|
|
365
|
+
tableCellBackground: {
|
|
366
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
367
|
+
unsetTableCellBackground: () => ReturnType;
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
declare module '@tiptap/core' {
|
|
374
|
+
interface Commands<ReturnType> {
|
|
375
|
+
iframe: {
|
|
376
|
+
/**
|
|
377
|
+
* Add an iframe
|
|
378
|
+
*/
|
|
379
|
+
setIframe: (options: {
|
|
380
|
+
src: string;
|
|
381
|
+
service: string;
|
|
382
|
+
}) => ReturnType;
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
declare module '@tiptap/core' {
|
|
389
|
+
interface Commands<ReturnType> {
|
|
390
|
+
search: {
|
|
391
|
+
setSearchTerm: (searchTerm: string) => ReturnType;
|
|
392
|
+
setReplaceTerm: (replaceTerm: string) => ReturnType;
|
|
393
|
+
replace: () => ReturnType;
|
|
394
|
+
replaceAll: () => ReturnType;
|
|
395
|
+
goToPrevSearchResult: () => void;
|
|
396
|
+
goToNextSearchResult: () => void;
|
|
397
|
+
setCaseSensitive: (caseSensitive: boolean) => ReturnType;
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
declare module '@tiptap/core' {
|
|
404
|
+
interface Commands<ReturnType> {
|
|
405
|
+
emoji: {
|
|
406
|
+
setEmoji: (emoji: {
|
|
407
|
+
name: string;
|
|
408
|
+
emoji: string;
|
|
409
|
+
}) => ReturnType;
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
declare module '@tiptap/core' {
|
|
416
|
+
interface Commands<ReturnType> {
|
|
417
|
+
katex: {
|
|
418
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
declare module '@tiptap/core' {
|
|
425
|
+
interface Commands<ReturnType> {
|
|
426
|
+
excalidraw: {
|
|
427
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
declare module '@tiptap/core' {
|
|
434
|
+
interface Commands<ReturnType> {
|
|
435
|
+
tableOfContents: {
|
|
436
|
+
setTableOfContents: () => ReturnType;
|
|
437
|
+
removeTableOfContents: () => ReturnType;
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
declare module '@tiptap/core' {
|
|
444
|
+
interface Commands<ReturnType> {
|
|
445
|
+
exportWord: {
|
|
446
|
+
exportToWord: () => ReturnType;
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
declare module '@tiptap/core' {
|
|
453
|
+
interface Commands<ReturnType> {
|
|
454
|
+
imageGifUpload: {
|
|
455
|
+
/**
|
|
456
|
+
* Add an image gif
|
|
457
|
+
*/
|
|
458
|
+
setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
459
|
+
/**
|
|
460
|
+
* Update an image gif
|
|
461
|
+
*/
|
|
462
|
+
updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
|
|
463
|
+
/**
|
|
464
|
+
* Set image alignment
|
|
465
|
+
*/
|
|
466
|
+
setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
declare module '@tiptap/core' {
|
|
473
|
+
interface Commands<ReturnType> {
|
|
474
|
+
attachment: {
|
|
475
|
+
setAttachment: (attrs?: unknown) => ReturnType;
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
declare module '@tiptap/core' {
|
|
482
|
+
interface Commands<ReturnType> {
|
|
483
|
+
mermaid: {
|
|
484
|
+
setMermaid: (options: any, replace?: any) => ReturnType;
|
|
485
|
+
setAlignImageMermaid: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
declare module '@tiptap/core' {
|
|
492
|
+
interface Commands<ReturnType> {
|
|
493
|
+
twitter: {
|
|
494
|
+
/**
|
|
495
|
+
* Insert a tweet
|
|
496
|
+
* @param options The tweet attributes
|
|
497
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
498
|
+
*/
|
|
499
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
500
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
declare module '@tiptap/core' {
|
|
507
|
+
interface Commands<ReturnType> {
|
|
508
|
+
drawer: {
|
|
509
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
510
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
}
|