@anweb/nuxt-aneditor 0.1.1 → 0.1.3
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
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
# AnEditor — WYSIWYG markdown editor for Nuxt
|
|
2
|
-
|
|
3
|
-
[![npm version][npm-version-src]][npm-version-href]
|
|
4
|
-
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
5
|
-
[![Nuxt][nuxt-src]][nuxt-href]
|
|
6
|
-
|
|
7
|
-
Visual WYSIWYG editor with markdown output. Toolbar, keyboard shortcuts, tables, lists, images, YouTube embeds, undo/redo.
|
|
8
|
-
|
|
9
|
-
## Setup
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm i @anweb/nuxt-aneditor
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
```ts
|
|
16
|
-
export default defineNuxtConfig({
|
|
17
|
-
modules: ['@anweb/nuxt-aneditor']
|
|
18
|
-
})
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Components
|
|
22
|
-
|
|
23
|
-
| Name | Description |
|
|
24
|
-
|---|---|
|
|
25
|
-
| `AnEditor` | WYSIWYG editor with toolbar, markdown v-model |
|
|
26
|
-
| `AnEditorViewer` | Read-only markdown renderer |
|
|
27
|
-
|
|
28
|
-
## AnEditor Props
|
|
29
|
-
|
|
30
|
-
| Prop | Type | Default | Description |
|
|
31
|
-
|---|---|---|---|
|
|
32
|
-
| `modelValue` | `string` | `''` | Markdown content (v-model) |
|
|
33
|
-
| `placeholder` | `string` | `''` | Placeholder text |
|
|
34
|
-
| `upload` | `(file: File) => Promise<string>` | — | Image upload function, returns URL |
|
|
35
|
-
| `disabled` | `boolean` | `false` | Disable editing |
|
|
36
|
-
|
|
37
|
-
## AnEditor Exposed
|
|
38
|
-
|
|
39
|
-
| Method | Description |
|
|
40
|
-
|---|---|
|
|
41
|
-
| `focus()` | Focus the editor |
|
|
42
|
-
| `clear()` | Clear all content |
|
|
43
|
-
|
|
44
|
-
## AnEditorViewer Props
|
|
45
|
-
|
|
46
|
-
| Prop | Type | Description |
|
|
47
|
-
|---|---|---|
|
|
48
|
-
| `content` | `string` | Markdown string to render |
|
|
49
|
-
|
|
50
|
-
## Keyboard Shortcuts
|
|
51
|
-
|
|
52
|
-
| Shortcut | Action |
|
|
53
|
-
|---|---|
|
|
54
|
-
| `Ctrl+B` | Bold |
|
|
55
|
-
| `Ctrl+I` | Italic |
|
|
56
|
-
| `Ctrl+K` | Insert link |
|
|
57
|
-
| `Ctrl+Z` | Undo |
|
|
58
|
-
| `Ctrl+Shift+Z` | Redo |
|
|
59
|
-
| `Tab` | Indent list item |
|
|
60
|
-
| `Shift+Tab` | Outdent list item |
|
|
61
|
-
|
|
62
|
-
## CSS Variables
|
|
63
|
-
|
|
64
|
-
| Variable | Default | Description |
|
|
65
|
-
|---|---|---|
|
|
66
|
-
| `--an-editor-border` | `#e0e0e0` | Border color |
|
|
67
|
-
| `--an-editor-border-focus` | `#7c83ff` | Focus border color |
|
|
68
|
-
| `--an-editor-background` | `#fff` | Editor background |
|
|
69
|
-
| `--an-editor-toolbar-background` | `#fafafa` | Toolbar background |
|
|
70
|
-
| `--an-editor-font-size` | `15px` | Content font size |
|
|
71
|
-
| `--an-editor-min-height` | `200px` | Minimum editor height |
|
|
72
|
-
|
|
73
|
-
<!-- Badges -->
|
|
74
|
-
[npm-version-src]: https://img.shields.io/npm/v/@anweb/nuxt-aneditor/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
|
75
|
-
[npm-version-href]: https://npmjs.com/package/@anweb/nuxt-aneditor
|
|
76
|
-
|
|
77
|
-
[npm-downloads-src]: https://img.shields.io/npm/dm/@anweb/nuxt-aneditor.svg?style=flat&colorA=020420&colorB=00DC82
|
|
78
|
-
[npm-downloads-href]: https://npm.chart.dev/@anweb/nuxt-aneditor
|
|
79
|
-
|
|
80
|
-
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
|
|
1
|
+
# AnEditor — WYSIWYG markdown editor for Nuxt
|
|
2
|
+
|
|
3
|
+
[![npm version][npm-version-src]][npm-version-href]
|
|
4
|
+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
5
|
+
[![Nuxt][nuxt-src]][nuxt-href]
|
|
6
|
+
|
|
7
|
+
Visual WYSIWYG editor with markdown output. Toolbar, keyboard shortcuts, tables, lists, images, YouTube embeds, undo/redo.
|
|
8
|
+
|
|
9
|
+
## Setup
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm i @anweb/nuxt-aneditor
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
export default defineNuxtConfig({
|
|
17
|
+
modules: ['@anweb/nuxt-aneditor']
|
|
18
|
+
})
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Components
|
|
22
|
+
|
|
23
|
+
| Name | Description |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `AnEditor` | WYSIWYG editor with toolbar, markdown v-model |
|
|
26
|
+
| `AnEditorViewer` | Read-only markdown renderer |
|
|
27
|
+
|
|
28
|
+
## AnEditor Props
|
|
29
|
+
|
|
30
|
+
| Prop | Type | Default | Description |
|
|
31
|
+
|---|---|---|---|
|
|
32
|
+
| `modelValue` | `string` | `''` | Markdown content (v-model) |
|
|
33
|
+
| `placeholder` | `string` | `''` | Placeholder text |
|
|
34
|
+
| `upload` | `(file: File) => Promise<string>` | — | Image upload function, returns URL |
|
|
35
|
+
| `disabled` | `boolean` | `false` | Disable editing |
|
|
36
|
+
|
|
37
|
+
## AnEditor Exposed
|
|
38
|
+
|
|
39
|
+
| Method | Description |
|
|
40
|
+
|---|---|
|
|
41
|
+
| `focus()` | Focus the editor |
|
|
42
|
+
| `clear()` | Clear all content |
|
|
43
|
+
|
|
44
|
+
## AnEditorViewer Props
|
|
45
|
+
|
|
46
|
+
| Prop | Type | Description |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| `content` | `string` | Markdown string to render |
|
|
49
|
+
|
|
50
|
+
## Keyboard Shortcuts
|
|
51
|
+
|
|
52
|
+
| Shortcut | Action |
|
|
53
|
+
|---|---|
|
|
54
|
+
| `Ctrl+B` | Bold |
|
|
55
|
+
| `Ctrl+I` | Italic |
|
|
56
|
+
| `Ctrl+K` | Insert link |
|
|
57
|
+
| `Ctrl+Z` | Undo |
|
|
58
|
+
| `Ctrl+Shift+Z` | Redo |
|
|
59
|
+
| `Tab` | Indent list item |
|
|
60
|
+
| `Shift+Tab` | Outdent list item |
|
|
61
|
+
|
|
62
|
+
## CSS Variables
|
|
63
|
+
|
|
64
|
+
| Variable | Default | Description |
|
|
65
|
+
|---|---|---|
|
|
66
|
+
| `--an-editor-border` | `#e0e0e0` | Border color |
|
|
67
|
+
| `--an-editor-border-focus` | `#7c83ff` | Focus border color |
|
|
68
|
+
| `--an-editor-background` | `#fff` | Editor background |
|
|
69
|
+
| `--an-editor-toolbar-background` | `#fafafa` | Toolbar background |
|
|
70
|
+
| `--an-editor-font-size` | `15px` | Content font size |
|
|
71
|
+
| `--an-editor-min-height` | `200px` | Minimum editor height |
|
|
72
|
+
|
|
73
|
+
<!-- Badges -->
|
|
74
|
+
[npm-version-src]: https://img.shields.io/npm/v/@anweb/nuxt-aneditor/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
|
75
|
+
[npm-version-href]: https://npmjs.com/package/@anweb/nuxt-aneditor
|
|
76
|
+
|
|
77
|
+
[npm-downloads-src]: https://img.shields.io/npm/dm/@anweb/nuxt-aneditor.svg?style=flat&colorA=020420&colorB=00DC82
|
|
78
|
+
[npm-downloads-href]: https://npm.chart.dev/@anweb/nuxt-aneditor
|
|
79
|
+
|
|
80
|
+
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
|
|
81
81
|
[nuxt-href]: https://nuxt.com
|
package/dist/module.json
CHANGED
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|