vue-editify 0.2.25 → 0.2.26
Sign up to get free protection for your applications and to get access to all the features.
- package/examples/App.vue +10 -3
- package/lib/editify/editify.vue.d.ts +0 -2
- package/lib/editify.es.js +51 -106
- package/lib/editify.umd.js +2 -2
- package/lib/index.d.ts +1 -3
- package/package.json +2 -2
- package/src/core/function.ts +3 -3
- package/src/editify/editify.vue +7 -39
- package/src/feature/redo.ts +1 -2
- package/src/feature/undo.ts +1 -3
- package/src/index.ts +1 -1
package/examples/App.vue
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
<template>
|
2
|
-
<div style="height: 100
|
3
|
-
<
|
2
|
+
<div style="height: 100%; padding: 40px; box-sizing: border-box">
|
3
|
+
<button @click="insert">插入</button>
|
4
|
+
<div>{{ val }}</div>
|
5
|
+
<Editify disabled :dark="dark" ref="editifyRef" border v-model="val" :menu="menuConfig" placeholder="Please Enter Text..." :toolbar="toolbarConfig" locale="zh_CN" show-word-length allow-paste-html></Editify>
|
4
6
|
</div>
|
5
7
|
</template>
|
6
8
|
<script setup lang="ts">
|
@@ -66,7 +68,12 @@ const toolbarConfig = ref({
|
|
66
68
|
use: true,
|
67
69
|
text: {}
|
68
70
|
})
|
69
|
-
const val = ref<string>(`<p><
|
71
|
+
const val = ref<string>(`<p>3333</p><p>3333</p><p>3333</p><p>3333</p>`)
|
72
|
+
|
73
|
+
const insert = () => {
|
74
|
+
editifyRef.value!.editor.insertText('hello')
|
75
|
+
editifyRef.value!.editor.domRender()
|
76
|
+
}
|
70
77
|
</script>
|
71
78
|
<style lang="less">
|
72
79
|
html,
|
@@ -764,8 +764,6 @@ declare const _default: import('vue').DefineComponent<{
|
|
764
764
|
menuHeight: import('vue').ComputedRef<number | null>;
|
765
765
|
collapseToEnd: () => void;
|
766
766
|
collapseToStart: () => void;
|
767
|
-
undo: () => void;
|
768
|
-
redo: () => void;
|
769
767
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
770
768
|
change: (...args: any[]) => void;
|
771
769
|
blur: (...args: any[]) => void;
|