dragon-editor 3.0.2 → 3.1.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 +5 -49
- package/dist/module.json +1 -1
- package/dist/runtime/components/DragonEditor.vue +510 -21
- package/dist/runtime/components/DragonEditorViewer.vue +307 -6
- package/dist/runtime/scss/editor.css +300 -0
- package/dist/runtime/scss/viewer.css +291 -0
- package/dist/runtime/store.d.ts +1 -0
- package/dist/runtime/store.mjs +4 -0
- package/dist/runtime/type.d.ts +51 -4
- package/dist/runtime/utils/block.d.ts +6 -4
- package/dist/runtime/utils/block.mjs +63 -22
- package/dist/runtime/utils/content.d.ts +2 -0
- package/dist/runtime/utils/content.mjs +15 -0
- package/dist/runtime/utils/convertor.d.ts +2 -1
- package/dist/runtime/utils/convertor.mjs +68 -9
- package/dist/runtime/utils/keyboardEvent.mjs +29 -11
- package/dist/runtime/utils/style.d.ts +1 -0
- package/dist/runtime/utils/style.mjs +288 -263
- package/dist/runtime/utils/ui.d.ts +0 -1
- package/dist/runtime/utils/ui.mjs +0 -35
- package/package.json +3 -2
- package/dist/runtime/plugin.d.ts +0 -2
- package/dist/runtime/plugin.mjs +0 -10
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
I just made the DragonEditor because I needed the WYSIWYG Editor to write on my [blog](https://dico.me).
|
|
32
32
|
|
|
33
|
-
This module support Nuxt3
|
|
33
|
+
This module support only Nuxt3.
|
|
34
34
|
|
|
35
35
|
# Dependencies
|
|
36
36
|
|
|
@@ -39,7 +39,7 @@ This module support Nuxt3 only.
|
|
|
39
39
|
## Install
|
|
40
40
|
|
|
41
41
|
```shell
|
|
42
|
-
|
|
42
|
+
npm i dragon-edtior
|
|
43
43
|
# or
|
|
44
44
|
yarn add dragon-editor
|
|
45
45
|
# or
|
|
@@ -68,7 +68,7 @@ Second. Use Component
|
|
|
68
68
|
</template>
|
|
69
69
|
|
|
70
70
|
<script setup lang="ts">
|
|
71
|
-
const $editor = ref<
|
|
71
|
+
const $editor = ref<DragonEditor>();
|
|
72
72
|
</script>
|
|
73
73
|
```
|
|
74
74
|
|
|
@@ -84,52 +84,8 @@ Done!
|
|
|
84
84
|
</template>
|
|
85
85
|
|
|
86
86
|
<script setup lang="ts">
|
|
87
|
-
const data = ref([]); // content data
|
|
87
|
+
const data = ref<DEContentData>([]); // content data
|
|
88
88
|
</script>
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
### getContentData
|
|
94
|
-
|
|
95
|
-
```html
|
|
96
|
-
<template>
|
|
97
|
-
<div class="editor-area">
|
|
98
|
-
<ClientOnly>
|
|
99
|
-
<DragonEditor ref="$editor" />
|
|
100
|
-
</ClientOnly>
|
|
101
|
-
<button @click="getData()">Get Data</button>
|
|
102
|
-
</div>
|
|
103
|
-
</template>
|
|
104
|
-
|
|
105
|
-
<script setup lang="ts">
|
|
106
|
-
const $editor = ref<any>();
|
|
107
|
-
|
|
108
|
-
function getData() {
|
|
109
|
-
console.log($editor.value.getContentData());
|
|
110
|
-
}
|
|
111
|
-
</script>
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### setContentData
|
|
115
|
-
|
|
116
|
-
```html
|
|
117
|
-
<template>
|
|
118
|
-
<div class="editor-area">
|
|
119
|
-
<ClientOnly>
|
|
120
|
-
<DragonEditor ref="$editor" />
|
|
121
|
-
</ClientOnly>
|
|
122
|
-
<button @click="setData()">Set Data</button>
|
|
123
|
-
</div>
|
|
124
|
-
</template>
|
|
125
|
-
|
|
126
|
-
<script setup lang="ts">
|
|
127
|
-
const $editor = ref<any>();
|
|
128
|
-
|
|
129
|
-
function setData() {
|
|
130
|
-
$editor.value.setContentData([...]);
|
|
131
|
-
}
|
|
132
|
-
</script>
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
<!-- More information is here [Document](123) -->
|
|
91
|
+
More information is here [Document](https://lovefields.github.io/dragonEditor-doc/)
|
package/dist/module.json
CHANGED