v-notion-editor 0.0.8 → 0.1.0
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 +7 -2
- package/components/NotionEditor.vue.d.ts +10 -0
- package/index.js +8802 -8019
- package/package.json +1 -1
- package/style.css +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# Vue Notion Editor
|
|
2
2
|
|
|
3
|
-
A powerful, feature-rich Vue 3 rich text editor component inspired by Notion, It delivers a complete editing experience with slash commands, context menus, drag-and-drop support, advanced formatting, enhanced tables, and image upload capabilities.
|
|
3
|
+
A powerful, feature-rich Vue 3 rich text editor component inspired by Notion, It delivers a complete editing experience with slash commands, context menus, drag-and-drop support, advanced formatting, enhanced tables, Masonry Grids and image upload capabilities.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- **Rich Text Formatting**: Bold, italic, underline, strikethrough, code, and color formatting
|
|
8
8
|
- **Advanced Block Types**: Headings, blockquotes, code blocks, lists, and task lists
|
|
9
9
|
- **Table Support**: Create, edit, and manipulate tables with advanced cell & row operations, including interactive drag-to-add/remove rows.
|
|
10
|
+
- **Masonry Grid Support**: Design and control masonry grids with column resizing, grid controls, and item-level customization.
|
|
10
11
|
- **Image Handling**: Drag-and-drop image uploads with customizable upload functions.
|
|
11
12
|
- **File Handler**: Smart paste handling for images and rich content
|
|
12
13
|
- **Image Resizing & Alignment**: Smoothly resize images with interactive handles and align them left, right, or center.
|
|
@@ -126,10 +127,13 @@ A comprehensive toolbar component with formatting options.
|
|
|
126
127
|
| Prop | Type | Default | Description |
|
|
127
128
|
| ----------------- | ---------- | --------- | --------------------------------- |
|
|
128
129
|
| `visibleToolbars` | `string[]` | All tools | Array of toolbar items to display |
|
|
130
|
+
| `slashCommand` | `boolean` | true | Enables the slash command menu |
|
|
131
|
+
| `showBubbleMenu` | `boolean` | true | Enables the bubble menu |
|
|
132
|
+
| `showDragHandle` | `boolean` | true | Enables the drag handle |
|
|
129
133
|
|
|
130
134
|
#### Available Toolbar Items
|
|
131
135
|
|
|
132
|
-
`headings`, `bold`, `italic`, `underline`, `strike`, `code`, `color`, `link`, `bulletList`, `orderedList`, `taskList`, `blockquote`, `table`, `align`, `image`, `divider`, `undo`, `redo`
|
|
136
|
+
`headings`, `bold`, `italic`, `underline`, `strike`, `code`, `color`, `link`, `bulletList`, `orderedList`, `taskList`, `blockquote`, `table`, `grid`, `align`, `image`, `divider`, `undo`, `redo`
|
|
133
137
|
|
|
134
138
|
## Usage Examples
|
|
135
139
|
|
|
@@ -274,6 +278,7 @@ Customize the editor appearance using CSS variables:
|
|
|
274
278
|
--editor-content-color-primary-dark-light: #007bff;
|
|
275
279
|
--editor-content-color-border: #c8c8c6;
|
|
276
280
|
--editor-content-color-border-dark: #d0d0ce;
|
|
281
|
+
--editor-selection-color: #ecebe7d1;
|
|
277
282
|
|
|
278
283
|
/* Content Background Colors */
|
|
279
284
|
--editor-content-bg-default: rgba(55, 53, 47, 0.12);
|
|
@@ -8,9 +8,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
8
8
|
imageUploadOptions?: ImageUploadOptions;
|
|
9
9
|
showDragHandle?: boolean;
|
|
10
10
|
showBubbleMenu?: boolean;
|
|
11
|
+
slashCommand?: boolean;
|
|
12
|
+
extensions?: any;
|
|
11
13
|
}>, {
|
|
12
14
|
showDragHandle: boolean;
|
|
13
15
|
showBubbleMenu: boolean;
|
|
16
|
+
slashCommand: boolean;
|
|
17
|
+
extensions: () => any[];
|
|
14
18
|
}>>, {
|
|
15
19
|
editor: import('vue').ShallowRef<import('@tiptap/vue-3').Editor, import('@tiptap/vue-3').Editor>;
|
|
16
20
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
@@ -25,9 +29,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
25
29
|
imageUploadOptions?: ImageUploadOptions;
|
|
26
30
|
showDragHandle?: boolean;
|
|
27
31
|
showBubbleMenu?: boolean;
|
|
32
|
+
slashCommand?: boolean;
|
|
33
|
+
extensions?: any;
|
|
28
34
|
}>, {
|
|
29
35
|
showDragHandle: boolean;
|
|
30
36
|
showBubbleMenu: boolean;
|
|
37
|
+
slashCommand: boolean;
|
|
38
|
+
extensions: () => any[];
|
|
31
39
|
}>>> & Readonly<{
|
|
32
40
|
onOnFocus?: () => any;
|
|
33
41
|
onOnBlur?: () => any;
|
|
@@ -35,6 +43,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
35
43
|
}>, {
|
|
36
44
|
showDragHandle: boolean;
|
|
37
45
|
showBubbleMenu: boolean;
|
|
46
|
+
slashCommand: boolean;
|
|
47
|
+
extensions: any;
|
|
38
48
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
39
49
|
export default _default;
|
|
40
50
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|