vue-editify 0.2.26 → 0.2.28

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
@@ -2,13 +2,12 @@
2
2
  <div style="height: 100%; padding: 40px; box-sizing: border-box">
3
3
  <button @click="insert">插入</button>
4
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>
5
+ <Editify :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>
6
6
  </div>
7
7
  </template>
8
8
  <script setup lang="ts">
9
9
  import { h, ref, onErrorCaptured } from 'vue'
10
10
  import { Editify } from '../src'
11
-
12
11
  onErrorCaptured(err => {
13
12
  console.log(err)
14
13
  })
@@ -73,6 +72,7 @@ const val = ref<string>(`<p>3333</p><p>3333</p><p>3333</p><p>3333</p>`)
73
72
  const insert = () => {
74
73
  editifyRef.value!.editor.insertText('hello')
75
74
  editifyRef.value!.editor.domRender()
75
+ editifyRef.value!.editor.rangeRender()
76
76
  }
77
77
  </script>
78
78
  <style lang="less">
@@ -240,7 +240,7 @@ export declare const getMenuConfig: (editTrans: (key: string) => any, editLocale
240
240
  * @param component
241
241
  * @returns
242
242
  */
243
- export declare const withInstall: <T extends Component>(component: T) => SFCWithInstall<typeof component>;
243
+ export declare const withInstall: <T extends Component>(component: T) => SFCWithInstall<T>;
244
244
  /**
245
245
  * 是否点击了编辑器以外的元素
246
246
  * @param editor
@@ -345,7 +345,7 @@ declare const _default: import('vue').DefineComponent<{
345
345
  }>> & {
346
346
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
347
347
  }, {
348
- type: "text" | "orderList" | "unorderList" | "link" | "table" | "video" | "image" | "codeBlock";
348
+ type: "link" | "text" | "orderList" | "unorderList" | "table" | "video" | "image" | "codeBlock";
349
349
  color: string;
350
350
  zIndex: number;
351
351
  modelValue: boolean;