reactjs-tiptap-editor-pro 0.2.30 → 0.2.31
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 -1
- package/src/components/ActionButton.tsx +4 -4
- package/src/components/ActionMenuButton.tsx +3 -3
- package/src/components/BubbleMenu.tsx +9 -9
- package/src/components/CharactorCount.tsx +1 -1
- package/src/components/ColorPicker.tsx +4 -4
- package/src/components/RichTextEditor.tsx +11 -11
- package/src/components/SizeSetter/SizeSetter.tsx +2 -2
- package/src/components/Toolbar.tsx +4 -4
- package/src/components/icons/Icon.tsx +1 -1
- package/src/components/icons/icons.ts +12 -12
- package/src/components/menus/bubble.ts +4 -4
- package/src/components/menus/components/BubbleMenuDrawer.tsx +6 -6
- package/src/components/menus/components/BubbleMenuExcalidraw.tsx +9 -9
- package/src/components/menus/components/BubbleMenuIframe.tsx +9 -9
- package/src/components/menus/components/BubbleMenuKatex.tsx +7 -7
- package/src/components/menus/components/BubbleMenuLink.tsx +2 -2
- package/src/components/menus/components/BubbleMenuMedia.tsx +3 -3
- package/src/components/menus/components/BubbleMenuMermaid.tsx +6 -6
- package/src/components/menus/components/BubbleMenuText.tsx +3 -3
- package/src/components/menus/components/BubbleMenuTwitter.tsx +5 -5
- package/src/components/menus/components/ColumnsBubbleMenu.tsx +4 -4
- package/src/components/menus/components/ContentMenu.tsx +4 -4
- package/src/components/menus/components/TableBubbleMenu.tsx +5 -5
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/dialog.tsx +1 -1
- package/src/components/ui/dropdown-menu.tsx +1 -1
- package/src/components/ui/emoji-picker.tsx +1 -1
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/select.tsx +1 -1
- package/src/components/ui/separator.tsx +1 -1
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/toast.tsx +1 -1
- package/src/components/ui/toaster.tsx +2 -2
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/components/ui/use-toast.ts +1 -1
- package/src/extension-bundle.ts +1 -1
- package/src/extensions/Attachment/Attachment.ts +6 -6
- package/src/extensions/Attachment/components/NodeViewAttachment/FileIcon.tsx +4 -4
- package/src/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.tsx +4 -4
- package/src/extensions/BaseKit.ts +8 -8
- package/src/extensions/Blockquote/Blockquote.ts +2 -2
- package/src/extensions/Bold/Bold.ts +2 -2
- package/src/extensions/BulletList/BulletList.ts +2 -2
- package/src/extensions/Clear/Clear.ts +2 -2
- package/src/extensions/Code/Code.ts +2 -2
- package/src/extensions/CodeBlock/CodeBlock.ts +5 -5
- package/src/extensions/CodeBlock/components/CodeBlockActiveButton.tsx +2 -2
- package/src/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock.tsx +7 -7
- package/src/extensions/Color/Color.ts +2 -2
- package/src/extensions/Color/components/ColorActionButton.tsx +3 -3
- package/src/extensions/Drawer/Drawer.ts +3 -3
- package/src/extensions/Drawer/components/ControlDrawer/ControlDrawer.tsx +1 -1
- package/src/extensions/Drawer/components/DrawerActiveButton.tsx +6 -6
- package/src/extensions/Drawer/components/EditDrawerBlock.tsx +6 -6
- package/src/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer.tsx +2 -2
- package/src/extensions/Emoji/Emoji.ts +1 -1
- package/src/extensions/Emoji/components/EmojiList/EmojiList.tsx +1 -1
- package/src/extensions/Emoji/components/EmojiPicker/EmojiPicker.tsx +2 -2
- package/src/extensions/Excalidraw/Excalidraw.ts +3 -3
- package/src/extensions/Excalidraw/components/ExcalidrawActiveButton.tsx +4 -4
- package/src/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw.tsx +4 -4
- package/src/extensions/ExportPdf/ExportPdf.ts +2 -2
- package/src/extensions/ExportWord/ExportWord.ts +3 -3
- package/src/extensions/FontFamily/FontFamily.ts +4 -4
- package/src/extensions/FontFamily/components/FontFamilyButton.tsx +3 -3
- package/src/extensions/FontSize/FontSize.ts +3 -3
- package/src/extensions/FontSize/components/FontSizeMenuButton.tsx +3 -3
- package/src/extensions/FormatPainter/FormatPainter.ts +2 -2
- package/src/extensions/Heading/Heading.ts +2 -2
- package/src/extensions/Heading/components/HeadingButton.tsx +3 -3
- package/src/extensions/Highlight/Highlight.ts +1 -1
- package/src/extensions/Highlight/components/HighlightActionButton.tsx +3 -3
- package/src/extensions/History/History.ts +2 -2
- package/src/extensions/History/components/HistoryActionButton.tsx +3 -3
- package/src/extensions/HorizontalRule/HorizontalRule.ts +2 -2
- package/src/extensions/Iframe/Iframe.ts +3 -3
- package/src/extensions/Iframe/components/IframeNodeView.tsx +4 -4
- package/src/extensions/Image/Image.ts +4 -4
- package/src/extensions/Image/components/ActionImageButton.tsx +8 -8
- package/src/extensions/Image/components/ImageCropper.tsx +6 -6
- package/src/extensions/Image/components/ImageView.tsx +1 -1
- package/src/extensions/Image/store.ts +3 -3
- package/src/extensions/ImageGif/ImageGif.ts +2 -2
- package/src/extensions/ImageGif/components/ImageGifActionButton.tsx +1 -1
- package/src/extensions/ImageGif/components/ImageGifView.tsx +1 -1
- package/src/extensions/ImportWord/ImportWord.ts +2 -2
- package/src/extensions/ImportWord/components/ImportWordButton.tsx +3 -3
- package/src/extensions/Indent/Indent.ts +3 -3
- package/src/extensions/Italic/Italic.ts +2 -2
- package/src/extensions/Katex/Katex.ts +2 -2
- package/src/extensions/Katex/components/KatexActiveButton.tsx +6 -6
- package/src/extensions/Katex/components/KatexWrapper.tsx +2 -2
- package/src/extensions/LineHeight/LineHeight.ts +4 -4
- package/src/extensions/LineHeight/components/LineHeightDropdown.tsx +3 -3
- package/src/extensions/Link/Link.ts +2 -2
- package/src/extensions/Link/components/LinkEditBlock.tsx +2 -2
- package/src/extensions/Link/components/LinkEditPopover.tsx +3 -3
- package/src/extensions/Link/components/LinkViewBlock.tsx +2 -2
- package/src/extensions/Mention/Mention.ts +3 -3
- package/src/extensions/Mermaid/Mermaid.ts +3 -3
- package/src/extensions/Mermaid/components/EditMermaidBlock.tsx +6 -6
- package/src/extensions/Mermaid/components/MermaidActiveButton.tsx +6 -6
- package/src/extensions/Mermaid/components/NodeViewMermaid/NodeViewMermaid.tsx +2 -2
- package/src/extensions/MoreMark/MoreMark.ts +3 -3
- package/src/extensions/MoreMark/components/ActionMoreButton.tsx +3 -3
- package/src/extensions/MultiColumn/MultiColumn.ts +1 -1
- package/src/extensions/MultiColumn/components/ColumnActionButton.ts +1 -1
- package/src/extensions/OrderedList/OrderedList.ts +2 -2
- package/src/extensions/SearchAndReplace/SearchAndReplace.ts +4 -4
- package/src/extensions/SearchAndReplace/components/SearchAndReplaceButton.tsx +5 -5
- package/src/extensions/SlashCommand/SlashCommand.ts +1 -1
- package/src/extensions/SlashCommand/components/CommandsList.tsx +3 -3
- package/src/extensions/SlashCommand/groups.ts +4 -4
- package/src/extensions/Strike/Strike.ts +2 -2
- package/src/extensions/Subscript/Subscript.ts +2 -2
- package/src/extensions/Table/Table.ts +2 -2
- package/src/extensions/Table/components/CreateTablePopover.tsx +3 -3
- package/src/extensions/Table/components/TableActionButton.tsx +3 -3
- package/src/extensions/TableOfContent/TableOfContent.ts +3 -3
- package/src/extensions/TableOfContent/components/NodeViewTableOfContent.tsx +2 -2
- package/src/extensions/TableOfContent/components/TableOfContentActionButton.tsx +3 -3
- package/src/extensions/TaskList/TaskList.ts +2 -2
- package/src/extensions/TextAlign/TextAlign.ts +2 -2
- package/src/extensions/TextAlign/components/TextAlignMenuButton.tsx +4 -4
- package/src/extensions/TextBubble/TextBubble.ts +1 -1
- package/src/extensions/TextBubble/components/TextDropdown.tsx +2 -2
- package/src/extensions/TextDirection/TextDirection.ts +1 -1
- package/src/extensions/TextDirection/components/TextDirectionButton.tsx +4 -4
- package/src/extensions/Twitter/Twitter.ts +2 -2
- package/src/extensions/Twitter/components/FormEditLinkTwitter.tsx +3 -3
- package/src/extensions/Twitter/components/TwitterActiveButton.tsx +3 -3
- package/src/extensions/UnderLine/Underline.ts +2 -2
- package/src/extensions/Video/Video.ts +4 -4
- package/src/extensions/Video/components/ActiveVideoButton.tsx +6 -6
- package/src/extensions/Video/store.ts +3 -3
- package/src/index.ts +3 -3
- package/src/locales/index.tsx +3 -3
- package/src/store/ProviderRichText.tsx +3 -3
- package/src/store/editableEditor.ts +3 -3
- package/src/store/store.ts +1 -1
- package/src/theme/theme.ts +3 -3
- package/src/utils/_event.ts +1 -1
- package/src/utils/columns.ts +1 -1
- package/src/utils/customEvents/customEvents.ts +1 -1
- package/src/utils/dom-dataset.ts +1 -1
- package/src/utils/line-height.ts +1 -1
- package/src/utils/utils.ts +1 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { Node, mergeAttributes } from '@tiptap/core';
|
|
3
3
|
import { ReactNodeViewRenderer } from '@tiptap/react';
|
|
4
4
|
|
|
5
|
-
import { NodeViewTableOfContent } from '
|
|
6
|
-
import { TableOfContentActionButton } from '
|
|
7
|
-
import { findNode, isTitleNode } from '
|
|
5
|
+
import { NodeViewTableOfContent } from 'reactjs-tiptap-editor-pro/extensions/TableOfContent/components/NodeViewTableOfContent';
|
|
6
|
+
import { TableOfContentActionButton } from 'reactjs-tiptap-editor-pro/extensions/TableOfContent/components/TableOfContentActionButton';
|
|
7
|
+
import { findNode, isTitleNode } from 'reactjs-tiptap-editor-pro/utils/node';
|
|
8
8
|
|
|
9
9
|
declare module '@tiptap/core' {
|
|
10
10
|
interface Commands<ReturnType> {
|
|
@@ -5,8 +5,8 @@ import { useCallback, useEffect, useState } from 'react';
|
|
|
5
5
|
import { NodeViewWrapper } from '@tiptap/react';
|
|
6
6
|
import cls from 'clsx';
|
|
7
7
|
|
|
8
|
-
import { useLocale } from '
|
|
9
|
-
import { useEditableEditor } from '
|
|
8
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
9
|
+
import { useEditableEditor } from 'reactjs-tiptap-editor-pro/store/editableEditor';
|
|
10
10
|
|
|
11
11
|
import styles from './index.module.scss';
|
|
12
12
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
|
|
3
3
|
import type { Editor } from '@tiptap/core';
|
|
4
|
-
import { ActionButton } from '
|
|
5
|
-
import { TableOfContents } from '
|
|
6
|
-
import { useActive } from '
|
|
4
|
+
import { ActionButton } from 'reactjs-tiptap-editor-pro/components/ActionButton';
|
|
5
|
+
import { TableOfContents } from 'reactjs-tiptap-editor-pro/extensions/TableOfContent/TableOfContent';
|
|
6
|
+
import { useActive } from 'reactjs-tiptap-editor-pro/hooks/useActive';
|
|
7
7
|
|
|
8
8
|
export function TableOfContentActionButton({ editor, icon, tooltip }: { editor: Editor, tooltip: string, icon: string }) {
|
|
9
9
|
const isTaskListActive = useActive(editor, TableOfContents.name);
|
|
@@ -3,8 +3,8 @@ import { TaskItem } from '@tiptap/extension-task-item';
|
|
|
3
3
|
import type { TaskListOptions as TiptapTaskListOptions } from '@tiptap/extension-task-list';
|
|
4
4
|
import { TaskList as TiptapTaskList } from '@tiptap/extension-task-list';
|
|
5
5
|
|
|
6
|
-
import { ActionButton } from '
|
|
7
|
-
import type { GeneralOptions } from '
|
|
6
|
+
import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
|
|
7
|
+
import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Represents the interface for task list options, extending TiptapTaskListOptions and GeneralOptions.
|
|
@@ -2,8 +2,8 @@ import type { Editor, Extension } from '@tiptap/core';
|
|
|
2
2
|
import type { TextAlignOptions as TiptapTextAlignOptions } from '@tiptap/extension-text-align';
|
|
3
3
|
import TiptapTextAlign from '@tiptap/extension-text-align';
|
|
4
4
|
|
|
5
|
-
import TextAlignMenuButton from '
|
|
6
|
-
import type { GeneralOptions } from '
|
|
5
|
+
import TextAlignMenuButton from 'reactjs-tiptap-editor-pro/extensions/TextAlign/components/TextAlignMenuButton';
|
|
6
|
+
import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
|
|
7
7
|
|
|
8
8
|
type Alignments = 'left' | 'center' | 'right' | 'justify';
|
|
9
9
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
|
|
3
|
-
import { ActionButton, IconComponent } from '
|
|
4
|
-
import { Popover, PopoverContent, PopoverTrigger, Toggle, Tooltip, TooltipContent, TooltipTrigger } from '
|
|
5
|
-
import type { ButtonViewReturnComponentProps } from '
|
|
6
|
-
import { getShortcutKey } from '
|
|
3
|
+
import { ActionButton, IconComponent } from 'reactjs-tiptap-editor-pro/components';
|
|
4
|
+
import { Popover, PopoverContent, PopoverTrigger, Toggle, Tooltip, TooltipContent, TooltipTrigger } from 'reactjs-tiptap-editor-pro/components/ui';
|
|
5
|
+
import type { ButtonViewReturnComponentProps } from 'reactjs-tiptap-editor-pro/types';
|
|
6
|
+
import { getShortcutKey } from 'reactjs-tiptap-editor-pro/utils/plateform';
|
|
7
7
|
|
|
8
8
|
export interface Item {
|
|
9
9
|
title: string
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Extension } from '@tiptap/core';
|
|
2
2
|
|
|
3
3
|
import TextDropdown from './components/TextDropdown';
|
|
4
|
-
import type { GeneralOptions } from '
|
|
4
|
+
import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
|
|
5
5
|
|
|
6
6
|
export interface TextBubbleOptions extends GeneralOptions<TextBubbleOptions> {}
|
|
7
7
|
|
|
@@ -2,8 +2,8 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { ChevronDown } from 'lucide-react';
|
|
4
4
|
|
|
5
|
-
import { Button, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuTrigger, icons } from '
|
|
6
|
-
import { useLocale } from '
|
|
5
|
+
import { Button, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuTrigger, icons } from 'reactjs-tiptap-editor-pro/components';
|
|
6
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
7
7
|
|
|
8
8
|
interface IPropsTextDropdown {
|
|
9
9
|
editor: any
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
2
2
|
import { Extension } from '@tiptap/core';
|
|
3
3
|
|
|
4
|
-
import TextDirectionButton from '
|
|
4
|
+
import TextDirectionButton from 'reactjs-tiptap-editor-pro/extensions/TextDirection/components/TextDirectionButton';
|
|
5
5
|
|
|
6
6
|
const TextDirection = Extension.create({
|
|
7
7
|
name: 'text-direction',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
|
|
3
|
-
import { ActionButton, IconComponent } from '
|
|
4
|
-
import { Popover, PopoverContent, PopoverTrigger, Toggle, Tooltip, TooltipContent, TooltipTrigger } from '
|
|
5
|
-
import type { ButtonViewReturnComponentProps } from '
|
|
6
|
-
import { getShortcutKey } from '
|
|
3
|
+
import { ActionButton, IconComponent } from 'reactjs-tiptap-editor-pro/components';
|
|
4
|
+
import { Popover, PopoverContent, PopoverTrigger, Toggle, Tooltip, TooltipContent, TooltipTrigger } from 'reactjs-tiptap-editor-pro/components/ui';
|
|
5
|
+
import type { ButtonViewReturnComponentProps } from 'reactjs-tiptap-editor-pro/types';
|
|
6
|
+
import { getShortcutKey } from 'reactjs-tiptap-editor-pro/utils/plateform';
|
|
7
7
|
|
|
8
8
|
export interface Item {
|
|
9
9
|
title: string
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Node, mergeAttributes, nodePasteRule } from '@tiptap/core';
|
|
2
2
|
import { ReactNodeViewRenderer } from '@tiptap/react';
|
|
3
|
-
import NodeViewTweet from '
|
|
4
|
-
import TwitterActiveButton from '
|
|
3
|
+
import NodeViewTweet from 'reactjs-tiptap-editor-pro/extensions/Twitter/components/NodeViewTweet';
|
|
4
|
+
import TwitterActiveButton from 'reactjs-tiptap-editor-pro/extensions/Twitter/components/TwitterActiveButton';
|
|
5
5
|
|
|
6
6
|
const TWITTER_REGEX_GLOBAL = /(https?:\/\/)?(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?/g;
|
|
7
7
|
const TWITTER_REGEX = /^https?:\/\/(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?$/;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
4
4
|
import { useEffect, useState } from 'react';
|
|
5
5
|
|
|
6
|
-
import { Button, Input, Label } from '
|
|
7
|
-
import { Twitter } from '
|
|
8
|
-
import { useLocale } from '
|
|
6
|
+
import { Button, Input, Label } from 'reactjs-tiptap-editor-pro/components';
|
|
7
|
+
import { Twitter } from 'reactjs-tiptap-editor-pro/extensions/Twitter/Twitter';
|
|
8
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
9
9
|
|
|
10
10
|
interface IPropsFormEditLinkTwitter {
|
|
11
11
|
editor: any
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ActionButton, IconComponent, Popover, PopoverContent, PopoverTrigger } from '
|
|
2
|
-
import FormEditLinkTwitter from '
|
|
3
|
-
import type { ButtonViewReturnComponentProps } from '
|
|
1
|
+
import { ActionButton, IconComponent, Popover, PopoverContent, PopoverTrigger } from 'reactjs-tiptap-editor-pro/components';
|
|
2
|
+
import FormEditLinkTwitter from 'reactjs-tiptap-editor-pro/extensions/Twitter/components/FormEditLinkTwitter';
|
|
3
|
+
import type { ButtonViewReturnComponentProps } from 'reactjs-tiptap-editor-pro/types';
|
|
4
4
|
|
|
5
5
|
interface IPropsTwitterActiveButton {
|
|
6
6
|
editor: any
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { UnderlineOptions as TiptapUnderlineOptions } from '@tiptap/extension-underline';
|
|
2
2
|
import TiptapUnderline from '@tiptap/extension-underline';
|
|
3
3
|
|
|
4
|
-
import { ActionButton } from '
|
|
5
|
-
import type { GeneralOptions } from '
|
|
4
|
+
import { ActionButton } from 'reactjs-tiptap-editor-pro/components';
|
|
5
|
+
import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
|
|
6
6
|
|
|
7
7
|
export interface UnderlineOptions
|
|
8
8
|
extends TiptapUnderlineOptions,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Node } from '@tiptap/core';
|
|
2
2
|
|
|
3
|
-
import { VIDEO_SIZE } from '
|
|
4
|
-
import ActionVideoButton from '
|
|
5
|
-
import type { GeneralOptions } from '
|
|
6
|
-
import { getCssUnitWithDefault } from '
|
|
3
|
+
import { VIDEO_SIZE } from 'reactjs-tiptap-editor-pro/constants';
|
|
4
|
+
import ActionVideoButton from 'reactjs-tiptap-editor-pro/extensions/Video/components/ActiveVideoButton';
|
|
5
|
+
import type { GeneralOptions } from 'reactjs-tiptap-editor-pro/types';
|
|
6
|
+
import { getCssUnitWithDefault } from 'reactjs-tiptap-editor-pro/utils/utils';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Represents the interface for video options, extending GeneralOptions.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import { ActionButton, Button, Input, Tabs, TabsContent, TabsList, TabsTrigger } from '
|
|
4
|
-
import { Dialog, DialogContent, DialogTitle, DialogTrigger } from '
|
|
5
|
-
import { Video } from '
|
|
6
|
-
import { useLocale } from '
|
|
7
|
-
import { listenEvent } from '
|
|
8
|
-
import { EVENTS } from '
|
|
3
|
+
import { ActionButton, Button, Input, Tabs, TabsContent, TabsList, TabsTrigger } from 'reactjs-tiptap-editor-pro/components';
|
|
4
|
+
import { Dialog, DialogContent, DialogTitle, DialogTrigger } from 'reactjs-tiptap-editor-pro/components/ui/dialog';
|
|
5
|
+
import { Video } from 'reactjs-tiptap-editor-pro/extensions/Video/Video';
|
|
6
|
+
import { useLocale } from 'reactjs-tiptap-editor-pro/locales';
|
|
7
|
+
import { listenEvent } from 'reactjs-tiptap-editor-pro/utils/customEvents/customEvents';
|
|
8
|
+
import { EVENTS } from 'reactjs-tiptap-editor-pro/utils/customEvents/events.constant';
|
|
9
9
|
|
|
10
10
|
function checkIsVideo(url: string) {
|
|
11
11
|
return /\.(?:mp4|webm|ogg|mov)$/i.test(url);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useStoreUploadVideo } from '
|
|
2
|
-
import { dispatchEvent } from '
|
|
3
|
-
import { EVENTS } from '
|
|
1
|
+
import { useStoreUploadVideo } from 'reactjs-tiptap-editor-pro/store/store';
|
|
2
|
+
import { dispatchEvent } from 'reactjs-tiptap-editor-pro/utils/customEvents/customEvents';
|
|
3
|
+
import { EVENTS } from 'reactjs-tiptap-editor-pro/utils/customEvents/events.constant';
|
|
4
4
|
|
|
5
5
|
export function useDialogVideo() {
|
|
6
6
|
const [v] = useStoreUploadVideo(store => store.value);
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useEditorState } from '
|
|
1
|
+
import { useEditorState } from 'reactjs-tiptap-editor-pro/hooks/useEditorState';
|
|
2
2
|
|
|
3
|
-
export { default } from '
|
|
3
|
+
export { default } from 'reactjs-tiptap-editor-pro/components/RichTextEditor';
|
|
4
4
|
|
|
5
|
-
export type { UseEditorStateReturn } from '
|
|
5
|
+
export type { UseEditorStateReturn } from 'reactjs-tiptap-editor-pro/hooks/useEditorState';
|
|
6
6
|
export { useEditorState };
|
|
7
7
|
export { BubbleMenu } from '@tiptap/react';
|
|
8
8
|
export type { Editor, UseEditorOptions } from '@tiptap/react';
|
package/src/locales/index.tsx
CHANGED
|
@@ -6,9 +6,9 @@ import pt_BR from './pt-br';
|
|
|
6
6
|
import vi from './vi';
|
|
7
7
|
import zh_CN from './zh-cn';
|
|
8
8
|
import hu_HU from './hu';
|
|
9
|
-
import mitt from '
|
|
10
|
-
import type { EventType } from '
|
|
11
|
-
import { DEFAULT_LANG_VALUE } from '
|
|
9
|
+
import mitt from 'reactjs-tiptap-editor-pro/utils/mitt';
|
|
10
|
+
import type { EventType } from 'reactjs-tiptap-editor-pro/utils/mitt';
|
|
11
|
+
import { DEFAULT_LANG_VALUE } from 'reactjs-tiptap-editor-pro/constants';
|
|
12
12
|
|
|
13
13
|
// Define supported language types
|
|
14
14
|
type LanguageType = 'en' | 'hu_HU' | 'vi' | 'zh_CN' | 'pt_BR' | (string & {});
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
3
|
import React, { memo, useEffect } from 'react';
|
|
4
4
|
|
|
5
|
-
import { ProviderEditableEditor, ProviderTheme, useStoreEditableEditor, useStoreTheme } from '
|
|
6
|
-
import { listenEvent } from '
|
|
7
|
-
import { EVENTS } from '
|
|
5
|
+
import { ProviderEditableEditor, ProviderTheme, useStoreEditableEditor, useStoreTheme } from 'reactjs-tiptap-editor-pro/store/store';
|
|
6
|
+
import { listenEvent } from 'reactjs-tiptap-editor-pro/utils/customEvents/customEvents';
|
|
7
|
+
import { EVENTS } from 'reactjs-tiptap-editor-pro/utils/customEvents/events.constant';
|
|
8
8
|
|
|
9
9
|
const EventInitial = memo(({ children, id }: any) => {
|
|
10
10
|
const [, setEditable] = useStoreEditableEditor(store => store.value);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useStoreEditableEditor } from '
|
|
2
|
-
import { dispatchEvent } from '
|
|
3
|
-
import { EVENTS } from '
|
|
1
|
+
import { useStoreEditableEditor } from 'reactjs-tiptap-editor-pro/store/store';
|
|
2
|
+
import { dispatchEvent } from 'reactjs-tiptap-editor-pro/utils/customEvents/customEvents';
|
|
3
|
+
import { EVENTS } from 'reactjs-tiptap-editor-pro/utils/customEvents/events.constant';
|
|
4
4
|
|
|
5
5
|
export function useEditableEditor() {
|
|
6
6
|
const [v] = useStoreEditableEditor(store => store.value);
|
package/src/store/store.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSignal } from 'reactjs-signal';
|
|
2
2
|
|
|
3
|
-
import createFastContext from '
|
|
3
|
+
import createFastContext from 'reactjs-tiptap-editor-pro/store/fast-context';
|
|
4
4
|
|
|
5
5
|
const { Provider: ProviderUploadImage, useStore: useStoreUploadImage } = createFastContext({
|
|
6
6
|
value: false
|
package/src/theme/theme.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useStoreTheme } from '
|
|
2
|
-
import { dispatchEvent } from '
|
|
3
|
-
import { EVENTS } from '
|
|
1
|
+
import { useStoreTheme } from 'reactjs-tiptap-editor-pro/store/store';
|
|
2
|
+
import { dispatchEvent } from 'reactjs-tiptap-editor-pro/utils/customEvents/customEvents';
|
|
3
|
+
import { EVENTS } from 'reactjs-tiptap-editor-pro/utils/customEvents/events.constant';
|
|
4
4
|
|
|
5
5
|
export function useTheme() {
|
|
6
6
|
const [v] = useStoreTheme(store => store.value);
|
package/src/utils/_event.ts
CHANGED
package/src/utils/columns.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { findParentNode } from '@tiptap/core';
|
|
|
3
3
|
import { Node } from '@tiptap/pm/model';
|
|
4
4
|
import { type EditorState, TextSelection } from '@tiptap/pm/state';
|
|
5
5
|
|
|
6
|
-
import { Column, MultiColumn } from '
|
|
6
|
+
import { Column, MultiColumn } from 'reactjs-tiptap-editor-pro/extensions/MultiColumn';
|
|
7
7
|
|
|
8
8
|
export function createColumn(colType: any, index: any, colContent = null) {
|
|
9
9
|
if (colContent) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type EventValues } from '
|
|
1
|
+
import { type EventValues } from 'reactjs-tiptap-editor-pro/utils/customEvents/events.constant';
|
|
2
2
|
|
|
3
3
|
export function listenEvent (eventName: EventValues, callback: any) {
|
|
4
4
|
window.addEventListener(eventName, callback);
|
package/src/utils/dom-dataset.ts
CHANGED
package/src/utils/line-height.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { NodeType, Node as ProsemirrorNode } from '@tiptap/pm/model';
|
|
|
3
3
|
import type { EditorState, Transaction } from '@tiptap/pm/state';
|
|
4
4
|
import { AllSelection, TextSelection } from '@tiptap/pm/state';
|
|
5
5
|
|
|
6
|
-
import { DEFAULT_LINE_HEIGHT } from '
|
|
6
|
+
import { DEFAULT_LINE_HEIGHT } from 'reactjs-tiptap-editor-pro/constants';
|
|
7
7
|
|
|
8
8
|
export const ALLOWED_NODE_TYPES = ['paragraph', 'heading', 'list_item', 'todo_item'];
|
|
9
9
|
|
package/src/utils/utils.ts
CHANGED