vue-editify 0.2.25 → 0.2.26

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/examples/App.vue CHANGED
@@ -1,6 +1,8 @@
1
1
  <template>
2
- <div style="height: 100%">
3
- <Editify :dark="dark" ref="editifyRef" border v-model="val" :menu="menuConfig" placeholder="Please Enter Text..." :toolbar="toolbarConfig" locale="zh_CN" show-word-length></Editify>
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><br/></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;