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