vdc-editor 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +177 -0
- package/lib/index.d.ts +3 -0
- package/lib/src/components/ActionButton.vue.d.ts +90 -0
- package/lib/src/components/ActionDropdownButton.vue.d.ts +67 -0
- package/lib/src/components/ActionDropdownButtonSplit.vue.d.ts +71 -0
- package/lib/src/components/ActionMenuButton.vue.d.ts +62 -0
- package/lib/src/components/ColorPicker.vue.d.ts +51 -0
- package/lib/src/components/CoreEditor.vue.d.ts +162 -0
- package/lib/src/components/SelectContextMenu.vue.d.ts +28 -0
- package/lib/src/components/SuperTextView.vue.d.ts +2 -0
- package/lib/src/components/Toolbar.vue.d.ts +31 -0
- package/lib/src/components/icons/Icon.vue.d.ts +20 -0
- package/lib/src/components/icons/icons.d.ts +106 -0
- package/lib/src/components/icons/index.d.ts +4 -0
- package/lib/src/components/icons/setupIcon.d.ts +1 -0
- package/lib/src/components/menus/BasicBubble.d.ts +59 -0
- package/lib/src/components/menus/ColumnsBubbleMenu.vue.d.ts +31 -0
- package/lib/src/components/menus/LinkBubbleMenu.vue.d.ts +31 -0
- package/lib/src/components/menus/TableBubbleMenu.vue.d.ts +24 -0
- package/lib/src/components/ui/accordion/index.d.ts +4 -0
- package/lib/src/components/ui/alert/index.d.ts +9 -0
- package/lib/src/components/ui/badge/Badge.vue.d.ts +29 -0
- package/lib/src/components/ui/badge/index.d.ts +7 -0
- package/lib/src/components/ui/button/Button.vue.d.ts +43 -0
- package/lib/src/components/ui/button/index.d.ts +8 -0
- package/lib/src/components/ui/checkbox/Checkbox.vue.d.ts +31 -0
- package/lib/src/components/ui/checkbox/index.d.ts +1 -0
- package/lib/src/components/ui/context-menu/ContextMenu.vue.d.ts +26 -0
- package/lib/src/components/ui/context-menu/ContextMenuCheckboxItem.vue.d.ts +33 -0
- package/lib/src/components/ui/context-menu/ContextMenuContent.vue.d.ts +39 -0
- package/lib/src/components/ui/context-menu/ContextMenuGroup.vue.d.ts +22 -0
- package/lib/src/components/ui/context-menu/ContextMenuItem.vue.d.ts +33 -0
- package/lib/src/components/ui/context-menu/ContextMenuLabel.vue.d.ts +29 -0
- package/lib/src/components/ui/context-menu/ContextMenuRadioGroup.vue.d.ts +26 -0
- package/lib/src/components/ui/context-menu/ContextMenuRadioItem.vue.d.ts +31 -0
- package/lib/src/components/ui/context-menu/ContextMenuSeparator.vue.d.ts +18 -0
- package/lib/src/components/ui/context-menu/ContextMenuShortcut.vue.d.ts +26 -0
- package/lib/src/components/ui/context-menu/ContextMenuSub.vue.d.ts +26 -0
- package/lib/src/components/ui/context-menu/ContextMenuSubContent.vue.d.ts +43 -0
- package/lib/src/components/ui/context-menu/ContextMenuSubTrigger.vue.d.ts +29 -0
- package/lib/src/components/ui/context-menu/ContextMenuTrigger.vue.d.ts +22 -0
- package/lib/src/components/ui/context-menu/index.d.ts +14 -0
- package/lib/src/components/ui/dialog/Dialog.vue.d.ts +26 -0
- package/lib/src/components/ui/dialog/DialogClose.vue.d.ts +22 -0
- package/lib/src/components/ui/dialog/DialogContent.vue.d.ts +41 -0
- package/lib/src/components/ui/dialog/DialogDescription.vue.d.ts +27 -0
- package/lib/src/components/ui/dialog/DialogFooter.vue.d.ts +26 -0
- package/lib/src/components/ui/dialog/DialogHeader.vue.d.ts +26 -0
- package/lib/src/components/ui/dialog/DialogScrollContent.vue.d.ts +41 -0
- package/lib/src/components/ui/dialog/DialogTitle.vue.d.ts +27 -0
- package/lib/src/components/ui/dialog/DialogTrigger.vue.d.ts +22 -0
- package/lib/src/components/ui/dialog/index.d.ts +9 -0
- package/lib/src/components/ui/drawer/index.d.ts +8 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +26 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +33 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +53 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +22 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +29 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +29 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +26 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +31 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +18 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +26 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +26 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +43 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +27 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +22 -0
- package/lib/src/components/ui/dropdown-menu/index.d.ts +15 -0
- package/lib/src/components/ui/input/Input.vue.d.ts +25 -0
- package/lib/src/components/ui/input/index.d.ts +1 -0
- package/lib/src/components/ui/label/Label.vue.d.ts +27 -0
- package/lib/src/components/ui/label/index.d.ts +1 -0
- package/lib/src/components/ui/menubar/index.d.ts +15 -0
- package/lib/src/components/ui/popover/Popover.vue.d.ts +26 -0
- package/lib/src/components/ui/popover/PopoverContent.vue.d.ts +58 -0
- package/lib/src/components/ui/popover/PopoverTrigger.vue.d.ts +22 -0
- package/lib/src/components/ui/popover/index.d.ts +4 -0
- package/lib/src/components/ui/resizable/ResizableHandle.vue.d.ts +24 -0
- package/lib/src/components/ui/resizable/ResizablePanelGroup.vue.d.ts +31 -0
- package/lib/src/components/ui/resizable/index.d.ts +3 -0
- package/lib/src/components/ui/scroll-area/ScrollArea.vue.d.ts +27 -0
- package/lib/src/components/ui/scroll-area/ScrollBar.vue.d.ts +32 -0
- package/lib/src/components/ui/scroll-area/index.d.ts +2 -0
- package/lib/src/components/ui/select/Select.vue.d.ts +28 -0
- package/lib/src/components/ui/select/SelectContent.vue.d.ts +49 -0
- package/lib/src/components/ui/select/SelectGroup.vue.d.ts +27 -0
- package/lib/src/components/ui/select/SelectItem.vue.d.ts +27 -0
- package/lib/src/components/ui/select/SelectItemText.vue.d.ts +22 -0
- package/lib/src/components/ui/select/SelectLabel.vue.d.ts +27 -0
- package/lib/src/components/ui/select/SelectScrollDownButton.vue.d.ts +27 -0
- package/lib/src/components/ui/select/SelectScrollUpButton.vue.d.ts +27 -0
- package/lib/src/components/ui/select/SelectSeparator.vue.d.ts +18 -0
- package/lib/src/components/ui/select/SelectTrigger.vue.d.ts +27 -0
- package/lib/src/components/ui/select/SelectValue.vue.d.ts +22 -0
- package/lib/src/components/ui/select/index.d.ts +11 -0
- package/lib/src/components/ui/separator/Separator.vue.d.ts +18 -0
- package/lib/src/components/ui/separator/index.d.ts +1 -0
- package/lib/src/components/ui/sheet/index.d.ts +14 -0
- package/lib/src/components/ui/slider/index.d.ts +1 -0
- package/lib/src/components/ui/switch/index.d.ts +1 -0
- package/lib/src/components/ui/tabs/Tabs.vue.d.ts +26 -0
- package/lib/src/components/ui/tabs/TabsContent.vue.d.ts +27 -0
- package/lib/src/components/ui/tabs/TabsList.vue.d.ts +27 -0
- package/lib/src/components/ui/tabs/TabsTrigger.vue.d.ts +27 -0
- package/lib/src/components/ui/tabs/index.d.ts +4 -0
- package/lib/src/components/ui/textarea/Textarea.vue.d.ts +25 -0
- package/lib/src/components/ui/textarea/index.d.ts +1 -0
- package/lib/src/components/ui/toast/index.d.ts +22 -0
- package/lib/src/components/ui/toast/use-toast.d.ts +349 -0
- package/lib/src/components/ui/toggle/Toggle.vue.d.ts +56 -0
- package/lib/src/components/ui/toggle/index.d.ts +8 -0
- package/lib/src/components/ui/toggle-group/index.d.ts +2 -0
- package/lib/src/components/ui/tooltip/Tooltip.vue.d.ts +26 -0
- package/lib/src/components/ui/tooltip/TooltipContent.vue.d.ts +47 -0
- package/lib/src/components/ui/tooltip/TooltipProvider.vue.d.ts +22 -0
- package/lib/src/components/ui/tooltip/TooltipTrigger.vue.d.ts +22 -0
- package/lib/src/components/ui/tooltip/index.d.ts +4 -0
- package/lib/src/constants/index.d.ts +55 -0
- package/lib/src/extensions/Ai/AI.d.ts +16 -0
- package/lib/src/extensions/Ai/components/AIButton.vue.d.ts +74 -0
- package/lib/src/extensions/Ai/index.d.ts +1 -0
- package/lib/src/extensions/AttributesSetup/AttributesSetup.d.ts +3 -0
- package/lib/src/extensions/AttributesSetup/index.d.ts +1 -0
- package/lib/src/extensions/BaseKit.d.ts +118 -0
- package/lib/src/extensions/Blockquote/Blockquote.d.ts +6 -0
- package/lib/src/extensions/Blockquote/index.d.ts +1 -0
- package/lib/src/extensions/Bold/Bold.d.ts +6 -0
- package/lib/src/extensions/Bold/index.d.ts +1 -0
- package/lib/src/extensions/BulletList/BulletList.d.ts +6 -0
- package/lib/src/extensions/BulletList/components/BulletListMenuButton.vue.d.ts +35 -0
- package/lib/src/extensions/BulletList/index.d.ts +1 -0
- package/lib/src/extensions/Clear/Clear.d.ts +6 -0
- package/lib/src/extensions/Clear/index.d.ts +1 -0
- package/lib/src/extensions/Code/Code.d.ts +6 -0
- package/lib/src/extensions/Code/index.d.ts +1 -0
- package/lib/src/extensions/CodeBlock/CodeBlock.d.ts +6 -0
- package/lib/src/extensions/CodeBlock/components/CodeBlockView.vue.d.ts +68 -0
- package/lib/src/extensions/CodeBlock/index.d.ts +1 -0
- package/lib/src/extensions/Color/Color.d.ts +6 -0
- package/lib/src/extensions/Color/components/ColorActionButton.vue.d.ts +48 -0
- package/lib/src/extensions/Color/index.d.ts +1 -0
- package/lib/src/extensions/Document/Document.d.ts +2 -0
- package/lib/src/extensions/Document/index.d.ts +1 -0
- package/lib/src/extensions/FindAndReplace/FindAndReplace.d.ts +58 -0
- package/lib/src/extensions/FindAndReplace/index.d.ts +1 -0
- package/lib/src/extensions/FontFamily/FontFamily.d.ts +25 -0
- package/lib/src/extensions/FontFamily/components/FontFamilyMenuButton.vue.d.ts +65 -0
- package/lib/src/extensions/FontFamily/index.d.ts +1 -0
- package/lib/src/extensions/FontSize/FontSize.d.ts +32 -0
- package/lib/src/extensions/FontSize/components/FontSizeMenuButton.vue.d.ts +64 -0
- package/lib/src/extensions/FontSize/index.d.ts +1 -0
- package/lib/src/extensions/FormatPainter/FormatPainter.d.ts +24 -0
- package/lib/src/extensions/FormatPainter/index.d.ts +1 -0
- package/lib/src/extensions/Fullscreen/Fullscreen.d.ts +6 -0
- package/lib/src/extensions/Fullscreen/index.d.ts +1 -0
- package/lib/src/extensions/Heading/Heading.d.ts +6 -0
- package/lib/src/extensions/Heading/components/HeadingButton.vue.d.ts +65 -0
- package/lib/src/extensions/Heading/index.d.ts +1 -0
- package/lib/src/extensions/Highlight/Highlight.d.ts +6 -0
- package/lib/src/extensions/Highlight/components/HighlightActionButton.vue.d.ts +49 -0
- package/lib/src/extensions/Highlight/index.d.ts +1 -0
- package/lib/src/extensions/History/History.d.ts +6 -0
- package/lib/src/extensions/History/index.d.ts +1 -0
- package/lib/src/extensions/HorizontalRule/HorizontalRule.d.ts +6 -0
- package/lib/src/extensions/HorizontalRule/index.d.ts +1 -0
- package/lib/src/extensions/IDAttr/IDPlugin.d.ts +4 -0
- package/lib/src/extensions/IDAttr/index.d.ts +1 -0
- package/lib/src/extensions/Iframe/Iframe.d.ts +24 -0
- package/lib/src/extensions/Iframe/embed.d.ts +113 -0
- package/lib/src/extensions/Iframe/index.d.ts +1 -0
- package/lib/src/extensions/Image/Image.d.ts +29 -0
- package/lib/src/extensions/Image/components/ImageView.vue.d.ts +68 -0
- package/lib/src/extensions/Image/index.d.ts +1 -0
- package/lib/src/extensions/ImageUpload/ImageUpload.d.ts +16 -0
- package/lib/src/extensions/ImageUpload/components/ImageUploader.vue.d.ts +68 -0
- package/lib/src/extensions/ImageUpload/index.d.ts +1 -0
- package/lib/src/extensions/ImportWord/ImportWord.d.ts +28 -0
- package/lib/src/extensions/ImportWord/index.d.ts +1 -0
- package/lib/src/extensions/ImportWord/utils.d.ts +2 -0
- package/lib/src/extensions/Indent/Indent.d.ts +23 -0
- package/lib/src/extensions/Indent/index.d.ts +1 -0
- package/lib/src/extensions/Italic/Italic.d.ts +6 -0
- package/lib/src/extensions/Italic/index.d.ts +1 -0
- package/lib/src/extensions/LineHeight/LineHeight.d.ts +17 -0
- package/lib/src/extensions/LineHeight/components/LineHeightDropdown.vue.d.ts +48 -0
- package/lib/src/extensions/LineHeight/index.d.ts +1 -0
- package/lib/src/extensions/Link/Link.d.ts +6 -0
- package/lib/src/extensions/Link/components/LinkEditBlock.vue.d.ts +30 -0
- package/lib/src/extensions/Link/components/LinkEditPopover.vue.d.ts +56 -0
- package/lib/src/extensions/Link/components/LinkViewBlock.vue.d.ts +37 -0
- package/lib/src/extensions/Link/index.d.ts +1 -0
- package/lib/src/extensions/ListItem/ListItem.d.ts +3 -0
- package/lib/src/extensions/ListItem/index.d.ts +1 -0
- package/lib/src/extensions/MoreMark/MoreMark.d.ts +20 -0
- package/lib/src/extensions/MoreMark/components/ActionMoreButton.vue.d.ts +65 -0
- package/lib/src/extensions/MoreMark/index.d.ts +1 -0
- package/lib/src/extensions/MultiColumn/Column.d.ts +4 -0
- package/lib/src/extensions/MultiColumn/Columns.d.ts +22 -0
- package/lib/src/extensions/MultiColumn/index.d.ts +2 -0
- package/lib/src/extensions/OrderedList/OrderedList.d.ts +6 -0
- package/lib/src/extensions/OrderedList/components/OrderedListMenuButton.vue.d.ts +44 -0
- package/lib/src/extensions/OrderedList/index.d.ts +1 -0
- package/lib/src/extensions/Page/computed.d.ts +122 -0
- package/lib/src/extensions/Page/core.d.ts +79 -0
- package/lib/src/extensions/Page/index.d.ts +23 -0
- package/lib/src/extensions/Page/node-view.vue.d.ts +68 -0
- package/lib/src/extensions/Page/page-plugin.d.ts +7 -0
- package/lib/src/extensions/Page/split-block.d.ts +3 -0
- package/lib/src/extensions/Page/split-list-item.d.ts +7 -0
- package/lib/src/extensions/Page/types.d.ts +40 -0
- package/lib/src/extensions/Page/utils.d.ts +48 -0
- package/lib/src/extensions/Preview/Preview.d.ts +13 -0
- package/lib/src/extensions/Preview/index.d.ts +1 -0
- package/lib/src/extensions/Printer/Printer.d.ts +6 -0
- package/lib/src/extensions/Printer/index.d.ts +1 -0
- package/lib/src/extensions/Selection/Selection.d.ts +4 -0
- package/lib/src/extensions/Selection/index.d.ts +1 -0
- package/lib/src/extensions/SlashCommand/CommandsList.vue.d.ts +35 -0
- package/lib/src/extensions/SlashCommand/SlashCommand.d.ts +4 -0
- package/lib/src/extensions/SlashCommand/groups.d.ts +4 -0
- package/lib/src/extensions/SlashCommand/index.d.ts +1 -0
- package/lib/src/extensions/SlashCommand/types.d.ts +26 -0
- package/lib/src/extensions/SpellChecker/hunspell-proofreader.d.ts +16 -0
- package/lib/src/extensions/SpellChecker/i-proofreader-interface.d.ts +10 -0
- package/lib/src/extensions/SpellChecker/index.d.ts +6 -0
- package/lib/src/extensions/SpellChecker/sapling-proofreader.d.ts +13 -0
- package/lib/src/extensions/SpellChecker/spellchecker-extension.d.ts +27 -0
- package/lib/src/extensions/SpellChecker/spellchecker.d.ts +44 -0
- package/lib/src/extensions/Strike/Strike.d.ts +6 -0
- package/lib/src/extensions/Strike/index.d.ts +1 -0
- package/lib/src/extensions/Subscript/Subscript.d.ts +23 -0
- package/lib/src/extensions/Subscript/index.d.ts +1 -0
- package/lib/src/extensions/SuperText/SuperText.d.ts +11 -0
- package/lib/src/extensions/SuperText/components/SuperText.vue.d.ts +68 -0
- package/lib/src/extensions/SuperText/index.d.ts +1 -0
- package/lib/src/extensions/Table/cell-background.d.ts +19 -0
- package/lib/src/extensions/Table/components/CreateTablePopover.vue.d.ts +32 -0
- package/lib/src/extensions/Table/components/TableActionButton.vue.d.ts +53 -0
- package/lib/src/extensions/Table/index.d.ts +7 -0
- package/lib/src/extensions/Table/table.d.ts +24 -0
- package/lib/src/extensions/TaskList/TaskList.d.ts +12 -0
- package/lib/src/extensions/TaskList/index.d.ts +1 -0
- package/lib/src/extensions/TextAlign/TextAlign.d.ts +18 -0
- package/lib/src/extensions/TextAlign/components/TextAlignMenuButton.vue.d.ts +65 -0
- package/lib/src/extensions/TextAlign/index.d.ts +1 -0
- package/lib/src/extensions/TextBubble/TextBubble.d.ts +7 -0
- package/lib/src/extensions/TextBubble/components/TextDropdown.vue.d.ts +49 -0
- package/lib/src/extensions/TextBubble/index.d.ts +1 -0
- package/lib/src/extensions/TrailingNode/TrailingNode.d.ts +12 -0
- package/lib/src/extensions/TrailingNode/index.d.ts +1 -0
- package/lib/src/extensions/UnderLine/Underline.d.ts +6 -0
- package/lib/src/extensions/UnderLine/index.d.ts +1 -0
- package/lib/src/extensions/Video/Video.d.ts +55 -0
- package/lib/src/extensions/Video/index.d.ts +1 -0
- package/lib/src/extensions/VideoUpload/VideoUpload.d.ts +14 -0
- package/lib/src/extensions/VideoUpload/components/VideoUploader.vue.d.ts +68 -0
- package/lib/src/extensions/VideoUpload/index.d.ts +1 -0
- package/lib/src/extensions/index.d.ts +74 -0
- package/lib/src/hooks/index.d.ts +6 -0
- package/lib/src/hooks/useCheckSpellStore.d.ts +9 -0
- package/lib/src/hooks/useConfigTiptap.d.ts +8 -0
- package/lib/src/hooks/useContext.d.ts +21 -0
- package/lib/src/hooks/useHotkeys.d.ts +4 -0
- package/lib/src/hooks/useNodePosition.d.ts +7 -0
- package/lib/src/hooks/useStore.d.ts +160 -0
- package/lib/src/hooks/useSuperTextStore.d.ts +20 -0
- package/lib/src/i18n.d.ts +337 -0
- package/lib/src/index.d.ts +12 -0
- package/lib/src/plugins/image-upload.d.ts +12 -0
- package/lib/src/type.d.ts +145 -0
- package/lib/src/utils/content.d.ts +4 -0
- package/lib/src/utils/getRenderContainer.d.ts +4 -0
- package/lib/src/utils/indent.d.ts +15 -0
- package/lib/src/utils/is-mobile.d.ts +19 -0
- package/lib/src/utils/line-height.d.ts +7 -0
- package/lib/src/utils/loadFonts.d.ts +1 -0
- package/lib/src/utils/mitt.d.ts +24 -0
- package/lib/src/utils/node-names.d.ts +31 -0
- package/lib/src/utils/plateform.d.ts +11 -0
- package/lib/src/utils/utils.d.ts +18 -0
- package/lib/src/utils.d.ts +3 -0
- package/lib/style.css +1 -0
- package/lib/vdc-editor.mjs +61980 -0
- package/lib/vdc-editor.umd.js +197 -0
- package/lib/vite.config.d.ts +2 -0
- package/package.json +174 -0
package/README.md
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
# Web Editor and React Native App
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
This repository contains two main projects:
|
|
7
|
+
|
|
8
|
+
1. **Web Editor**: A web-based text editor built with Vue.js and [Tiptap](https://tiptap.dev/), a modern and extendable rich-text editor framework.
|
|
9
|
+
2. **React Native App**: A mobile app built with React Native that wraps the web editor using a WebView, making the editor accessible on mobile platforms.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Table of Contents
|
|
14
|
+
- [Web Editor](#web-editor)
|
|
15
|
+
- [Features](#features)
|
|
16
|
+
- [Setup and Installation](#setup-and-installation)
|
|
17
|
+
- [Usage](#usage)
|
|
18
|
+
- [React Native App](#react-native-app)
|
|
19
|
+
- [Features](#features-1)
|
|
20
|
+
- [Setup and Installation](#setup-and-installation-1)
|
|
21
|
+
- [Usage](#usage-1)
|
|
22
|
+
- [Project Structure](#project-structure)
|
|
23
|
+
- [Scripts](#scripts)
|
|
24
|
+
- [Contributing](#contributing)
|
|
25
|
+
- [License](#license)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Web Editor
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
- **Rich-text editing**: Using Tiptap to provide a highly customizable editing experience.
|
|
33
|
+
- **Vue.js**: The frontend framework for building reactive user interfaces.
|
|
34
|
+
- **Customization**: Easily extendable with additional features and plugins from the Tiptap ecosystem.
|
|
35
|
+
|
|
36
|
+
### Setup and Installation
|
|
37
|
+
|
|
38
|
+
1. **Clone the repository:**
|
|
39
|
+
```bash
|
|
40
|
+
git clone https://github.com/your-username/your-repo-name.git
|
|
41
|
+
cd your-repo-name
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
2. **Navigate to the web editor folder:**
|
|
45
|
+
```bash
|
|
46
|
+
cd pakages/web
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
3. **Install dependencies:**
|
|
50
|
+
```bash
|
|
51
|
+
npm install
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
4. **Run the development server:**
|
|
55
|
+
```bash
|
|
56
|
+
npm run dev
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
5. **Open the editor in your browser** at `http://localhost:5173/`.
|
|
60
|
+
|
|
61
|
+
### Usage
|
|
62
|
+
To start using the editor, simply open the URL in your browser, and you will see a full-featured text editor. You can edit, format, and style text as you like. More features can be added through Tiptap extensions.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## React Native App
|
|
67
|
+
|
|
68
|
+
### Features
|
|
69
|
+
- **WebView**: Displays the Vue-based web editor inside a WebView component.
|
|
70
|
+
- **Cross-platform**: Available for both iOS and Android through React Native.
|
|
71
|
+
- **Simple navigation**: Load the web editor seamlessly inside the app.
|
|
72
|
+
|
|
73
|
+
### Setup and Installation
|
|
74
|
+
|
|
75
|
+
1. **Navigate to the React Native app folder:**
|
|
76
|
+
```bash
|
|
77
|
+
cd pakages/native
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
2. **Install dependencies:**
|
|
81
|
+
```bash
|
|
82
|
+
npm install
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
3. **Link required packages (for React Native < 0.60):**
|
|
86
|
+
```bash
|
|
87
|
+
react-native link
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
4. **Run the app on iOS or Android:**
|
|
91
|
+
|
|
92
|
+
For iOS:
|
|
93
|
+
```bash
|
|
94
|
+
npx react-native run-ios
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
For Android:
|
|
98
|
+
```bash
|
|
99
|
+
npx react-native run-android
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Usage
|
|
103
|
+
Once the app is running, it will open the web editor inside a WebView, allowing users to edit text from their mobile devices with a responsive interface.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Project Structure
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
/packages
|
|
111
|
+
│
|
|
112
|
+
├── /web # Vue.js project containing the Tiptap editor
|
|
113
|
+
│ ├── /src # Vue components and assets
|
|
114
|
+
│ ├── /public # Static files
|
|
115
|
+
│ └── package.json # Web editor dependencies and scripts
|
|
116
|
+
│
|
|
117
|
+
├── /native # React Native project wrapping the web editor
|
|
118
|
+
│ ├── ... [Link text](https://docs.expo.dev/get-started/start-developing/)
|
|
119
|
+
│
|
|
120
|
+
└── README.md # This README file
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Scripts
|
|
126
|
+
|
|
127
|
+
The `package.json` file includes the following script commands under the `"scripts"` section:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
"scripts": {
|
|
131
|
+
"app": "yarn workspace native-app start",
|
|
132
|
+
"web": "yarn workspace web-app dev"
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Breakdown:
|
|
137
|
+
|
|
138
|
+
- **`"app": "yarn workspace native-app start"`**
|
|
139
|
+
- This command is used to **start the React Native app**.
|
|
140
|
+
- It specifies that the command should be run within the `native-app` workspace.
|
|
141
|
+
- `native-app` refers to the folder that contains the React Native code.
|
|
142
|
+
- When you run `yarn app`, it triggers the `yarn start` command in the `native-app` workspace, which will launch the development environment for the React Native app, allowing you to run it on your mobile devices or emulators.
|
|
143
|
+
|
|
144
|
+
- **`"web": "yarn workspace web-app dev"`**
|
|
145
|
+
- This command is used to **start the web editor** (Vue.js + Tiptap).
|
|
146
|
+
- Similar to the React Native script, it is scoped to the `web-app` workspace.
|
|
147
|
+
- `web-app` refers to the folder containing the Vue.js web editor.
|
|
148
|
+
- When you run `yarn web`, it triggers the `yarn dev` command in the `web-app` workspace, which will start the local development server, allowing you to view and develop the editor in a browser.
|
|
149
|
+
|
|
150
|
+
### How to Use:
|
|
151
|
+
|
|
152
|
+
1. **To run the mobile app (React Native)**:
|
|
153
|
+
```bash
|
|
154
|
+
yarn app
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
2. **To run the web editor (Vue.js + Tiptap)**:
|
|
158
|
+
```bash
|
|
159
|
+
yarn web
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Contributing
|
|
165
|
+
|
|
166
|
+
Contributions are welcome! Please follow the steps below to contribute:
|
|
167
|
+
|
|
168
|
+
1. Fork the repository.
|
|
169
|
+
2. Create a new feature branch (`git checkout -b feature-branch`).
|
|
170
|
+
3. Commit your changes (`git commit -m 'Add some feature'`).
|
|
171
|
+
4. Push to the branch (`git push origin feature-branch`).
|
|
172
|
+
5. Create a new Pull Request.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## License
|
|
177
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ButtonViewReturnComponentProps } from '../type';
|
|
2
|
+
import { TooltipContentProps } from 'radix-vue';
|
|
3
|
+
import { icons } from './icons';
|
|
4
|
+
import { Editor } from '@tiptap/core';
|
|
5
|
+
import { HTMLAttributes } from 'vue';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
icon?: keyof typeof icons;
|
|
9
|
+
title?: string;
|
|
10
|
+
tooltip?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
shortcutKeys?: string[];
|
|
13
|
+
customClass?: string;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
tooltipOptions?: TooltipContentProps;
|
|
16
|
+
color?: string;
|
|
17
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
18
|
+
isActive?: ButtonViewReturnComponentProps['isActive'];
|
|
19
|
+
editor?: Editor;
|
|
20
|
+
variant?: string;
|
|
21
|
+
class?: HTMLAttributes['class'];
|
|
22
|
+
}
|
|
23
|
+
declare function __VLS_template(): {
|
|
24
|
+
icon?(_: {}): any;
|
|
25
|
+
default?(_: {}): any;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
28
|
+
icon: undefined;
|
|
29
|
+
title: undefined;
|
|
30
|
+
tooltip: undefined;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
customClass: string;
|
|
33
|
+
color: undefined;
|
|
34
|
+
loading: boolean;
|
|
35
|
+
shortcutKeys: undefined;
|
|
36
|
+
tooltipOptions: undefined;
|
|
37
|
+
action: undefined;
|
|
38
|
+
isActive: undefined;
|
|
39
|
+
variant: string;
|
|
40
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
41
|
+
icon: undefined;
|
|
42
|
+
title: undefined;
|
|
43
|
+
tooltip: undefined;
|
|
44
|
+
disabled: boolean;
|
|
45
|
+
customClass: string;
|
|
46
|
+
color: undefined;
|
|
47
|
+
loading: boolean;
|
|
48
|
+
shortcutKeys: undefined;
|
|
49
|
+
tooltipOptions: undefined;
|
|
50
|
+
action: undefined;
|
|
51
|
+
isActive: undefined;
|
|
52
|
+
variant: string;
|
|
53
|
+
}>>> & Readonly<{}>, {
|
|
54
|
+
icon: keyof typeof icons;
|
|
55
|
+
color: string;
|
|
56
|
+
disabled: boolean;
|
|
57
|
+
title: string;
|
|
58
|
+
tooltip: string;
|
|
59
|
+
shortcutKeys: string[];
|
|
60
|
+
customClass: string;
|
|
61
|
+
loading: boolean;
|
|
62
|
+
tooltipOptions: TooltipContentProps;
|
|
63
|
+
action: (value?: any) => void;
|
|
64
|
+
isActive: () => boolean;
|
|
65
|
+
variant: string;
|
|
66
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
67
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
68
|
+
export default _default;
|
|
69
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
70
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
71
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
72
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
73
|
+
} : {
|
|
74
|
+
type: import('vue').PropType<T[K]>;
|
|
75
|
+
required: true;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
type __VLS_WithDefaults<P, D> = {
|
|
79
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
80
|
+
default: D[K];
|
|
81
|
+
}> : P[K];
|
|
82
|
+
};
|
|
83
|
+
type __VLS_Prettify<T> = {
|
|
84
|
+
[K in keyof T]: T[K];
|
|
85
|
+
} & {};
|
|
86
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
87
|
+
new (): {
|
|
88
|
+
$slots: S;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ButtonViewReturnComponentProps } from '../type';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
icon?: any;
|
|
5
|
+
title?: string;
|
|
6
|
+
tooltip?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
class?: string;
|
|
9
|
+
btn_class?: string;
|
|
10
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
11
|
+
isActive?: ButtonViewReturnComponentProps['isActive'];
|
|
12
|
+
}
|
|
13
|
+
declare function __VLS_template(): {
|
|
14
|
+
default?(_: {}): any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
17
|
+
icon: undefined;
|
|
18
|
+
title: undefined;
|
|
19
|
+
tooltip: undefined;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
action: undefined;
|
|
22
|
+
isActive: undefined;
|
|
23
|
+
class: string;
|
|
24
|
+
btn_class: string;
|
|
25
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
26
|
+
icon: undefined;
|
|
27
|
+
title: undefined;
|
|
28
|
+
tooltip: undefined;
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
action: undefined;
|
|
31
|
+
isActive: undefined;
|
|
32
|
+
class: string;
|
|
33
|
+
btn_class: string;
|
|
34
|
+
}>>> & Readonly<{}>, {
|
|
35
|
+
class: string;
|
|
36
|
+
icon: any;
|
|
37
|
+
disabled: boolean;
|
|
38
|
+
title: string;
|
|
39
|
+
tooltip: string;
|
|
40
|
+
action: (value?: any) => void;
|
|
41
|
+
isActive: () => boolean;
|
|
42
|
+
btn_class: string;
|
|
43
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
44
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
45
|
+
export default _default;
|
|
46
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
47
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
48
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
49
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
50
|
+
} : {
|
|
51
|
+
type: import('vue').PropType<T[K]>;
|
|
52
|
+
required: true;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
type __VLS_WithDefaults<P, D> = {
|
|
56
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
57
|
+
default: D[K];
|
|
58
|
+
}> : P[K];
|
|
59
|
+
};
|
|
60
|
+
type __VLS_Prettify<T> = {
|
|
61
|
+
[K in keyof T]: T[K];
|
|
62
|
+
} & {};
|
|
63
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
64
|
+
new (): {
|
|
65
|
+
$slots: S;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ButtonViewReturnComponentProps } from '../type';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
icon?: any;
|
|
5
|
+
title?: string;
|
|
6
|
+
tooltip?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
class?: string;
|
|
9
|
+
shortcutKeys?: string[];
|
|
10
|
+
btn_class?: string;
|
|
11
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
12
|
+
isActive?: ButtonViewReturnComponentProps['isActive'];
|
|
13
|
+
}
|
|
14
|
+
declare function __VLS_template(): {
|
|
15
|
+
default?(_: {}): any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
18
|
+
icon: undefined;
|
|
19
|
+
title: undefined;
|
|
20
|
+
tooltip: undefined;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
action: undefined;
|
|
23
|
+
isActive: undefined;
|
|
24
|
+
shortcutKeys: undefined;
|
|
25
|
+
class: string;
|
|
26
|
+
btn_class: string;
|
|
27
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
28
|
+
icon: undefined;
|
|
29
|
+
title: undefined;
|
|
30
|
+
tooltip: undefined;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
action: undefined;
|
|
33
|
+
isActive: undefined;
|
|
34
|
+
shortcutKeys: undefined;
|
|
35
|
+
class: string;
|
|
36
|
+
btn_class: string;
|
|
37
|
+
}>>> & Readonly<{}>, {
|
|
38
|
+
class: string;
|
|
39
|
+
icon: any;
|
|
40
|
+
disabled: boolean;
|
|
41
|
+
title: string;
|
|
42
|
+
tooltip: string;
|
|
43
|
+
shortcutKeys: string[];
|
|
44
|
+
action: (value?: any) => void;
|
|
45
|
+
isActive: () => boolean;
|
|
46
|
+
btn_class: string;
|
|
47
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
48
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
49
|
+
export default _default;
|
|
50
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
51
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
52
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
53
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
54
|
+
} : {
|
|
55
|
+
type: import('vue').PropType<T[K]>;
|
|
56
|
+
required: true;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
type __VLS_WithDefaults<P, D> = {
|
|
60
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
61
|
+
default: D[K];
|
|
62
|
+
}> : P[K];
|
|
63
|
+
};
|
|
64
|
+
type __VLS_Prettify<T> = {
|
|
65
|
+
[K in keyof T]: T[K];
|
|
66
|
+
} & {};
|
|
67
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
68
|
+
new (): {
|
|
69
|
+
$slots: S;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ButtonViewReturnComponentProps } from '../type';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
icon?: any;
|
|
5
|
+
class?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
tooltip?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
shortcutKeys?: string[];
|
|
10
|
+
color?: string;
|
|
11
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
12
|
+
isActive?: ButtonViewReturnComponentProps['isActive'];
|
|
13
|
+
}
|
|
14
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
15
|
+
icon: undefined;
|
|
16
|
+
title: undefined;
|
|
17
|
+
tooltip: undefined;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
color: undefined;
|
|
20
|
+
shortcutKeys: undefined;
|
|
21
|
+
action: undefined;
|
|
22
|
+
isActive: undefined;
|
|
23
|
+
class: string;
|
|
24
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
25
|
+
icon: undefined;
|
|
26
|
+
title: undefined;
|
|
27
|
+
tooltip: undefined;
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
color: undefined;
|
|
30
|
+
shortcutKeys: undefined;
|
|
31
|
+
action: undefined;
|
|
32
|
+
isActive: undefined;
|
|
33
|
+
class: string;
|
|
34
|
+
}>>> & Readonly<{}>, {
|
|
35
|
+
class: string;
|
|
36
|
+
icon: any;
|
|
37
|
+
color: string;
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
title: string;
|
|
40
|
+
tooltip: string;
|
|
41
|
+
shortcutKeys: string[];
|
|
42
|
+
action: (value?: any) => void;
|
|
43
|
+
isActive: () => boolean;
|
|
44
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
45
|
+
export default _default;
|
|
46
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
47
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
48
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
49
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
50
|
+
} : {
|
|
51
|
+
type: import('vue').PropType<T[K]>;
|
|
52
|
+
required: true;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
type __VLS_WithDefaults<P, D> = {
|
|
56
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
57
|
+
default: D[K];
|
|
58
|
+
}> : P[K];
|
|
59
|
+
};
|
|
60
|
+
type __VLS_Prettify<T> = {
|
|
61
|
+
[K in keyof T]: T[K];
|
|
62
|
+
} & {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
highlight?: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
default?(_: {}): any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
10
|
+
modelValue: string;
|
|
11
|
+
highlight: boolean;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (color: string | undefined) => void;
|
|
15
|
+
change: (color: string | undefined) => void;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
17
|
+
modelValue: string;
|
|
18
|
+
highlight: boolean;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
}>>> & Readonly<{
|
|
21
|
+
onChange?: ((color: string | undefined) => any) | undefined;
|
|
22
|
+
"onUpdate:modelValue"?: ((color: string | undefined) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
highlight: boolean;
|
|
26
|
+
modelValue: string;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
31
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
32
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
33
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
34
|
+
} : {
|
|
35
|
+
type: import('vue').PropType<T[K]>;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
type __VLS_WithDefaults<P, D> = {
|
|
40
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
41
|
+
default: D[K];
|
|
42
|
+
}> : P[K];
|
|
43
|
+
};
|
|
44
|
+
type __VLS_Prettify<T> = {
|
|
45
|
+
[K in keyof T]: T[K];
|
|
46
|
+
} & {};
|
|
47
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { AnyExtension, JSONContent, Editor as CoreEditor } from '@tiptap/core';
|
|
2
|
+
import { Editor } from '@tiptap/vue-3';
|
|
3
|
+
|
|
4
|
+
type SBSEditorOnChange = {
|
|
5
|
+
/** Editor object */
|
|
6
|
+
editor: CoreEditor;
|
|
7
|
+
/** Output content, can be a string or JSON content */
|
|
8
|
+
output: string | JSONContent;
|
|
9
|
+
};
|
|
10
|
+
interface EditorProps {
|
|
11
|
+
/**
|
|
12
|
+
* input value
|
|
13
|
+
*/
|
|
14
|
+
modelValue?: string | object;
|
|
15
|
+
/**
|
|
16
|
+
* Editor output type
|
|
17
|
+
*
|
|
18
|
+
* @default 'html'
|
|
19
|
+
*/
|
|
20
|
+
output?: 'html' | 'json' | 'text';
|
|
21
|
+
/**
|
|
22
|
+
* dark mode
|
|
23
|
+
*
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
dark?: boolean;
|
|
27
|
+
dense?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Readonly
|
|
30
|
+
*
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Hide Editor Toolbar
|
|
36
|
+
*
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
hideToolbar?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Hide Editor Menubar
|
|
42
|
+
*
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
hideMenubar?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Hide Editor Bubble Menu
|
|
48
|
+
*
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
disableBubble?: boolean;
|
|
52
|
+
hideBubble?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Remove tiptap default wrapper when editor is empty eg. <p></p>
|
|
55
|
+
*
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
removeDefaultWrapper?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Editor content maximum width
|
|
61
|
+
*/
|
|
62
|
+
maxWidth?: string | number;
|
|
63
|
+
/**
|
|
64
|
+
* Editor content minimum height
|
|
65
|
+
*/
|
|
66
|
+
minHeight?: string | number;
|
|
67
|
+
/**
|
|
68
|
+
* Editor content maximum height
|
|
69
|
+
*/
|
|
70
|
+
maxHeight?: string | number;
|
|
71
|
+
/**
|
|
72
|
+
* Tiptap extensions
|
|
73
|
+
*/
|
|
74
|
+
extensions?: AnyExtension[];
|
|
75
|
+
/**
|
|
76
|
+
* Editor container class
|
|
77
|
+
*/
|
|
78
|
+
editorClass?: string | string[] | Record<string, any>;
|
|
79
|
+
/**
|
|
80
|
+
* Editor content class
|
|
81
|
+
*/
|
|
82
|
+
contentClass?: string | string[] | Record<string, any>;
|
|
83
|
+
}
|
|
84
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EditorProps>, {
|
|
85
|
+
modelValue: string;
|
|
86
|
+
output: string;
|
|
87
|
+
dark: undefined;
|
|
88
|
+
dense: boolean;
|
|
89
|
+
disabled: boolean;
|
|
90
|
+
hideToolbar: boolean;
|
|
91
|
+
disableBubble: boolean;
|
|
92
|
+
hideBubble: boolean;
|
|
93
|
+
removeDefaultWrapper: boolean;
|
|
94
|
+
maxWidth: undefined;
|
|
95
|
+
minHeight: undefined;
|
|
96
|
+
maxHeight: undefined;
|
|
97
|
+
extensions: () => never[];
|
|
98
|
+
editorClass: undefined;
|
|
99
|
+
contentClass: undefined;
|
|
100
|
+
}>>, {
|
|
101
|
+
editor: Editor;
|
|
102
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
103
|
+
enter: () => void;
|
|
104
|
+
change: (value: SBSEditorOnChange) => void;
|
|
105
|
+
"update:modelValue": (value: string | object | undefined) => void;
|
|
106
|
+
"changed:selection": (value: any) => void;
|
|
107
|
+
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EditorProps>, {
|
|
108
|
+
modelValue: string;
|
|
109
|
+
output: string;
|
|
110
|
+
dark: undefined;
|
|
111
|
+
dense: boolean;
|
|
112
|
+
disabled: boolean;
|
|
113
|
+
hideToolbar: boolean;
|
|
114
|
+
disableBubble: boolean;
|
|
115
|
+
hideBubble: boolean;
|
|
116
|
+
removeDefaultWrapper: boolean;
|
|
117
|
+
maxWidth: undefined;
|
|
118
|
+
minHeight: undefined;
|
|
119
|
+
maxHeight: undefined;
|
|
120
|
+
extensions: () => never[];
|
|
121
|
+
editorClass: undefined;
|
|
122
|
+
contentClass: undefined;
|
|
123
|
+
}>>> & Readonly<{
|
|
124
|
+
onChange?: ((value: SBSEditorOnChange) => any) | undefined;
|
|
125
|
+
onEnter?: (() => any) | undefined;
|
|
126
|
+
"onUpdate:modelValue"?: ((value: string | object | undefined) => any) | undefined;
|
|
127
|
+
"onChanged:selection"?: ((value: any) => any) | undefined;
|
|
128
|
+
}>, {
|
|
129
|
+
disabled: boolean;
|
|
130
|
+
extensions: AnyExtension[];
|
|
131
|
+
modelValue: string | object;
|
|
132
|
+
output: "html" | "json" | "text";
|
|
133
|
+
maxHeight: string | number;
|
|
134
|
+
maxWidth: string | number;
|
|
135
|
+
minHeight: string | number;
|
|
136
|
+
dark: boolean;
|
|
137
|
+
dense: boolean;
|
|
138
|
+
hideToolbar: boolean;
|
|
139
|
+
disableBubble: boolean;
|
|
140
|
+
hideBubble: boolean;
|
|
141
|
+
removeDefaultWrapper: boolean;
|
|
142
|
+
editorClass: string | string[] | Record<string, any>;
|
|
143
|
+
contentClass: string | string[] | Record<string, any>;
|
|
144
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
145
|
+
export default _default;
|
|
146
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
147
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
148
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
149
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
150
|
+
} : {
|
|
151
|
+
type: import('vue').PropType<T[K]>;
|
|
152
|
+
required: true;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
type __VLS_WithDefaults<P, D> = {
|
|
156
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
157
|
+
default: D[K];
|
|
158
|
+
}> : P[K];
|
|
159
|
+
};
|
|
160
|
+
type __VLS_Prettify<T> = {
|
|
161
|
+
[K in keyof T]: T[K];
|
|
162
|
+
} & {};
|