vue-editify 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
package/examples/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createApp } from 'vue'
2
- import App from './App.vue'
3
- import Editify from '../src'
4
- createApp(App).use(Editify, { locale: 'zh_CN' }).mount('#app')
1
+ import { createApp } from 'vue'
2
+ import App from './App.vue'
3
+ import Editify from '../src'
4
+ createApp(App).use(Editify, { locale: 'zh_CN' }).mount('#app')
package/lib/editify.es.js CHANGED
@@ -2263,14 +2263,14 @@ const inlineParse = [
2263
2263
  ];
2264
2264
  const handleNotStackBlock = function(element2) {
2265
2265
  if (element2.hasChildren()) {
2266
- const blocks = element2.children.filter((el) => {
2267
- return !el.isEmpty() && el.isBlock();
2266
+ const children = element2.children.filter((el) => {
2267
+ return !el.isEmpty();
2268
+ });
2269
+ const blocks = children.filter((el) => {
2270
+ return el.isBlock();
2268
2271
  });
2269
2272
  blocks.forEach((el) => {
2270
2273
  el.type = element2.type == "inline" ? "inline" : "inblock";
2271
- if (el.type == "inblock") {
2272
- el.behavior = "block";
2273
- }
2274
2274
  });
2275
2275
  }
2276
2276
  };
@@ -2279,23 +2279,30 @@ const handleInblockWithOther = function(element2) {
2279
2279
  const children = element2.children.filter((el) => {
2280
2280
  return !el.isEmpty();
2281
2281
  });
2282
- const inblocks = children.filter((el) => {
2282
+ let allIsBlock = children.every((el) => {
2283
2283
  return el.isInblock();
2284
2284
  });
2285
- if (inblocks.length && inblocks.length != children.length) {
2286
- inblocks.forEach((el) => {
2287
- el.type = "inline";
2285
+ if (!allIsBlock) {
2286
+ children.forEach((el) => {
2287
+ if (el.isInblock()) {
2288
+ el.type = "inline";
2289
+ }
2288
2290
  });
2289
2291
  }
2290
2292
  }
2291
2293
  };
2292
2294
  const handleInlineChildrenNotInblock = function(element2) {
2293
2295
  if (element2.isInline() && element2.hasChildren()) {
2294
- const inblocks = element2.children.filter((el) => {
2295
- return !el.isEmpty() && el.isInblock();
2296
+ const children = element2.children.filter((el) => {
2297
+ return !el.isEmpty();
2298
+ });
2299
+ const inblocks = children.filter((el) => {
2300
+ return el.isInblock();
2296
2301
  });
2297
2302
  inblocks.forEach((el) => {
2298
- el.type = "inline";
2303
+ if (el.isInblock()) {
2304
+ el.type = "inline";
2305
+ }
2299
2306
  });
2300
2307
  }
2301
2308
  };
@@ -2304,20 +2311,23 @@ const breakFormat = function(element2) {
2304
2311
  const children = element2.children.filter((el) => {
2305
2312
  return !el.isEmpty();
2306
2313
  });
2307
- const breaks = children.filter((el) => {
2314
+ const allIsBreak = children.every((el) => {
2308
2315
  return el.isBreak();
2309
2316
  });
2310
- if (breaks.length && breaks.length == children.length) {
2317
+ if (allIsBreak && children.length) {
2318
+ const breakEl = children[0];
2311
2319
  if (this.range && element2.isContains(this.range.anchor.element)) {
2312
- this.range.anchor.moveToStart(breaks[0]);
2320
+ this.range.anchor.moveToStart(breakEl);
2313
2321
  }
2314
2322
  if (this.range && element2.isContains(this.range.focus.element)) {
2315
- this.range.focus.moveToStart(breaks[0]);
2323
+ this.range.focus.moveToStart(breakEl);
2316
2324
  }
2317
- element2.children = [breaks[0]];
2318
- } else if (breaks.length) {
2319
- breaks.forEach((el) => {
2320
- el.toEmpty();
2325
+ element2.children = [breakEl];
2326
+ } else {
2327
+ element2.children.forEach((el) => {
2328
+ if (el.isBreak()) {
2329
+ el.toEmpty();
2330
+ }
2321
2331
  });
2322
2332
  }
2323
2333
  }
@@ -2477,15 +2487,11 @@ const mergeWithParentElement = function(element2) {
2477
2487
  item.parent = parent;
2478
2488
  });
2479
2489
  }
2480
- mergeElement(parent);
2481
2490
  }
2482
2491
  };
2483
- const mergeElement = (ele) => {
2484
- if (ele.hasChildren() && ele.children.length == 1 && canMerge(ele, ele.children[0])) {
2485
- merge(ele, ele.children[0]);
2486
- }
2487
- };
2488
- mergeElement(element2);
2492
+ if (element2.hasChildren() && element2.children.length == 1 && canMerge(element2, element2.children[0])) {
2493
+ merge(element2, element2.children[0]);
2494
+ }
2489
2495
  };
2490
2496
  const { Mac } = platform.os();
2491
2497
  const isUndo = function(e) {
@@ -2570,7 +2576,7 @@ const setRangeInVisible = function() {
2570
2576
  const childRect = target.getBoundingClientRect();
2571
2577
  const parentRect = root.getBoundingClientRect();
2572
2578
  if (root.clientHeight < scrollHeight) {
2573
- if (childRect.top < parentRect.top) {
2579
+ if (childRect.bottom < parentRect.top) {
2574
2580
  await element$1.setScrollTop({
2575
2581
  el: root,
2576
2582
  number: 0
@@ -2581,7 +2587,7 @@ const setRangeInVisible = function() {
2581
2587
  el: root,
2582
2588
  number: tempChildRect.top - tempParentRect.top
2583
2589
  });
2584
- } else if (childRect.bottom > parentRect.bottom) {
2590
+ } else if (childRect.top > parentRect.bottom) {
2585
2591
  await element$1.setScrollTop({
2586
2592
  el: root,
2587
2593
  number: 0
@@ -2595,7 +2601,7 @@ const setRangeInVisible = function() {
2595
2601
  }
2596
2602
  }
2597
2603
  if (root.clientWidth < scrollWidth) {
2598
- if (childRect.left < parentRect.left) {
2604
+ if (childRect.right < parentRect.left) {
2599
2605
  await element$1.setScrollLeft({
2600
2606
  el: root,
2601
2607
  number: 0
@@ -2606,7 +2612,7 @@ const setRangeInVisible = function() {
2606
2612
  el: root,
2607
2613
  number: tempChildRect.left - tempParentRect.left + 20
2608
2614
  });
2609
- } else if (childRect.right > parentRect.right) {
2615
+ } else if (childRect.left > parentRect.right) {
2610
2616
  await element$1.setScrollLeft({
2611
2617
  el: root,
2612
2618
  number: 0
@@ -2638,10 +2644,8 @@ const handleStackEmpty = function() {
2638
2644
  const breakEle = new AlexElement("closed", "br", null, null, null);
2639
2645
  this.addElementTo(breakEle, ele);
2640
2646
  this.stack = [ele];
2641
- if (this.range) {
2642
- this.range.anchor.moveToStart(breakEle);
2643
- this.range.focus.moveToStart(breakEle);
2644
- }
2647
+ this.range.anchor.moveToStart(breakEle);
2648
+ this.range.focus.moveToStart(breakEle);
2645
2649
  }
2646
2650
  };
2647
2651
  const handleSelectionChange = function() {
@@ -2879,67 +2883,6 @@ class AlexEditor {
2879
2883
  const focus = new AlexPoint(firstElement, 0);
2880
2884
  this.range = new AlexRange(anchor, focus);
2881
2885
  }
2882
- /**
2883
- * 根据光标执行复制操作
2884
- * isCut表示是否在执行剪切操作,默认为false,这个参数仅在内部使用
2885
- */
2886
- async copy(isCut = false) {
2887
- if (!this.useClipboard) {
2888
- return;
2889
- }
2890
- if (!this.range) {
2891
- return;
2892
- }
2893
- if (!this.allowCopy) {
2894
- return;
2895
- }
2896
- let result = this.getElementsByRange().list;
2897
- if (result.length == 0) {
2898
- return;
2899
- }
2900
- let html = "";
2901
- let text = "";
2902
- result.forEach((item) => {
2903
- const newEl = item.element.clone();
2904
- if (item.offset) {
2905
- newEl.textContent = newEl.textContent.substring(item.offset[0], item.offset[1]);
2906
- }
2907
- newEl.__render();
2908
- html += newEl.elm.outerHTML;
2909
- text += newEl.elm.innerText;
2910
- });
2911
- const clipboardItem = new window.ClipboardItem({
2912
- "text/html": new Blob([html], { type: "text/html" }),
2913
- "text/plain": new Blob([text], { type: "text/plain" })
2914
- });
2915
- await navigator.clipboard.write([clipboardItem]);
2916
- if (!isCut) {
2917
- this.emit("copy", text, html);
2918
- }
2919
- return { text, html };
2920
- }
2921
- /**
2922
- * 根据光标进行剪切操作
2923
- */
2924
- async cut() {
2925
- if (!this.useClipboard) {
2926
- return;
2927
- }
2928
- if (!this.range) {
2929
- return;
2930
- }
2931
- if (!this.allowCut) {
2932
- return;
2933
- }
2934
- const result = await this.copy(true);
2935
- if (result) {
2936
- if (!this.disabled) {
2937
- this.delete();
2938
- }
2939
- this.emit("cut", result.text, result.html);
2940
- }
2941
- return result;
2942
- }
2943
2886
  /**
2944
2887
  * 根据光标进行粘贴操作
2945
2888
  */
@@ -2990,6 +2933,7 @@ class AlexEditor {
2990
2933
  await this.customHtmlPaste.apply(this, [elements, data2]);
2991
2934
  } else {
2992
2935
  for (let i2 = 0; i2 < elements.length; i2++) {
2936
+ this.formatElement(elements[i2]);
2993
2937
  this.insertElement(elements[i2], false);
2994
2938
  }
2995
2939
  this.emit("pasteHtml", elements, data2);
@@ -3048,6 +2992,67 @@ class AlexEditor {
3048
2992
  }
3049
2993
  }
3050
2994
  }
2995
+ /**
2996
+ * 根据光标进行剪切操作
2997
+ */
2998
+ async cut() {
2999
+ if (!this.useClipboard) {
3000
+ return;
3001
+ }
3002
+ if (!this.range) {
3003
+ return;
3004
+ }
3005
+ if (!this.allowCut) {
3006
+ return;
3007
+ }
3008
+ const result = await this.copy(true);
3009
+ if (result) {
3010
+ if (!this.disabled) {
3011
+ this.delete();
3012
+ }
3013
+ this.emit("cut", result.text, result.html);
3014
+ }
3015
+ return result;
3016
+ }
3017
+ /**
3018
+ * 根据光标执行复制操作
3019
+ * isCut表示是否在执行剪切操作,默认为false,这个参数仅在内部使用
3020
+ */
3021
+ async copy(isCut = false) {
3022
+ if (!this.useClipboard) {
3023
+ return;
3024
+ }
3025
+ if (!this.range) {
3026
+ return;
3027
+ }
3028
+ if (!this.allowCopy) {
3029
+ return;
3030
+ }
3031
+ let result = this.getElementsByRange().list;
3032
+ if (result.length == 0) {
3033
+ return;
3034
+ }
3035
+ let html = "";
3036
+ let text = "";
3037
+ result.forEach((item) => {
3038
+ const newEl = item.element.clone();
3039
+ if (item.offset) {
3040
+ newEl.textContent = newEl.textContent.substring(item.offset[0], item.offset[1]);
3041
+ }
3042
+ newEl.__render();
3043
+ html += newEl.elm.outerHTML;
3044
+ text += newEl.elm.innerText;
3045
+ });
3046
+ const clipboardItem = new window.ClipboardItem({
3047
+ "text/html": new Blob([html], { type: "text/html" }),
3048
+ "text/plain": new Blob([text], { type: "text/plain" })
3049
+ });
3050
+ await navigator.clipboard.write([clipboardItem]);
3051
+ if (!isCut) {
3052
+ this.emit("copy", text, html);
3053
+ }
3054
+ return { text, html };
3055
+ }
3051
3056
  /**
3052
3057
  * 根据光标进行删除操作
3053
3058
  */
@@ -3601,58 +3606,83 @@ class AlexEditor {
3601
3606
  }
3602
3607
  }
3603
3608
  /**
3604
- * 格式化stack
3609
+ * 格式化某个元素
3605
3610
  */
3606
- formatElementStack() {
3607
- const format = (elements, fn, isStack = false) => {
3608
- let index = 0;
3609
- while (index < elements.length) {
3610
- if (elements[index].isEmpty()) {
3611
- if (this.range && elements[index].isContains(this.range.anchor.element)) {
3611
+ formatElement(element2) {
3612
+ let renderRules = this.renderRules.filter((fn) => {
3613
+ return typeof fn == "function";
3614
+ });
3615
+ [handleNotStackBlock, handleInblockWithOther, handleInlineChildrenNotInblock, breakFormat, mergeWithBrotherElement, mergeWithParentElement, ...renderRules].forEach((fn) => {
3616
+ fn.apply(this, [element2]);
3617
+ });
3618
+ if (element2.hasChildren()) {
3619
+ let length = element2.children.length;
3620
+ for (let i = 0; i < length; i++) {
3621
+ const childElement = element2.children[i];
3622
+ if (childElement.isEmpty()) {
3623
+ if (this.range && childElement.isContains(this.range.anchor.element)) {
3612
3624
  setRecentlyPoint.apply(this, [this.range.anchor]);
3613
3625
  }
3614
- if (this.range && elements[index].isContains(this.range.focus.element)) {
3626
+ if (this.range && childElement.isContains(this.range.focus.element)) {
3615
3627
  setRecentlyPoint.apply(this, [this.range.focus]);
3616
3628
  }
3617
- elements.splice(index, 1);
3629
+ element2.children.splice(i, 1);
3630
+ i -= 1;
3631
+ length -= 1;
3618
3632
  continue;
3619
3633
  }
3620
- fn.apply(this, [elements[index]]);
3621
- if (elements[index].isEmpty()) {
3622
- if (this.range && elements[index].isContains(this.range.anchor.element)) {
3634
+ this.formatElement(childElement);
3635
+ if (childElement.isEmpty()) {
3636
+ if (this.range && childElement.isContains(this.range.anchor.element)) {
3623
3637
  setRecentlyPoint.apply(this, [this.range.anchor]);
3624
3638
  }
3625
- if (this.range && elements[index].isContains(this.range.focus.element)) {
3639
+ if (this.range && childElement.isContains(this.range.focus.element)) {
3626
3640
  setRecentlyPoint.apply(this, [this.range.focus]);
3627
3641
  }
3628
- elements.splice(index, 1);
3642
+ element2.children.splice(i, 1);
3643
+ i -= 1;
3644
+ length -= 1;
3629
3645
  continue;
3630
3646
  }
3631
- if (!elements[index].isBlock() && isStack) {
3632
- elements[index].convertToBlock();
3647
+ }
3648
+ }
3649
+ }
3650
+ /**
3651
+ * 格式化stack
3652
+ */
3653
+ formatElementStack() {
3654
+ let length = this.stack.length;
3655
+ for (let i = 0; i < length; i++) {
3656
+ const element2 = this.stack[i];
3657
+ if (element2.isEmpty()) {
3658
+ if (this.range && element2.isContains(this.range.anchor.element)) {
3659
+ setRecentlyPoint.apply(this, [this.range.anchor]);
3660
+ }
3661
+ if (this.range && element2.isContains(this.range.focus.element)) {
3662
+ setRecentlyPoint.apply(this, [this.range.focus]);
3633
3663
  }
3634
- if (elements[index].hasChildren()) {
3635
- format(elements[index].children, fn);
3664
+ this.stack.splice(i, 1);
3665
+ i -= 1;
3666
+ length -= 1;
3667
+ continue;
3668
+ }
3669
+ if (!element2.isBlock()) {
3670
+ element2.convertToBlock();
3671
+ }
3672
+ this.formatElement(element2);
3673
+ if (element2.isEmpty()) {
3674
+ if (this.range && element2.isContains(this.range.anchor.element)) {
3675
+ setRecentlyPoint.apply(this, [this.range.anchor]);
3636
3676
  }
3637
- if (elements[index].isEmpty()) {
3638
- if (this.range && elements[index].isContains(this.range.anchor.element)) {
3639
- setRecentlyPoint.apply(this, [this.range.anchor]);
3640
- }
3641
- if (this.range && elements[index].isContains(this.range.focus.element)) {
3642
- setRecentlyPoint.apply(this, [this.range.focus]);
3643
- }
3644
- elements.splice(index, 1);
3645
- continue;
3677
+ if (this.range && element2.isContains(this.range.focus.element)) {
3678
+ setRecentlyPoint.apply(this, [this.range.focus]);
3646
3679
  }
3647
- index++;
3680
+ this.stack.splice(i, 1);
3681
+ i -= 1;
3682
+ length -= 1;
3683
+ continue;
3648
3684
  }
3649
- };
3650
- let renderRules = this.renderRules.filter((fn) => {
3651
- return typeof fn == "function";
3652
- });
3653
- [handleNotStackBlock, handleInblockWithOther, handleInlineChildrenNotInblock, breakFormat, mergeWithBrotherElement, mergeWithParentElement, ...renderRules].forEach((fn) => {
3654
- format(this.stack, fn, true);
3655
- });
3685
+ }
3656
3686
  handleStackEmpty.apply(this);
3657
3687
  }
3658
3688
  /**
@@ -16344,7 +16374,7 @@ const specialInblockHandle = function(editor, element2) {
16344
16374
  });
16345
16375
  }
16346
16376
  };
16347
- const Triangle_vue_vue_type_style_index_0_scoped_70b6f344_lang = "";
16377
+ const Triangle_vue_vue_type_style_index_0_scoped_c7bb62b7_lang = "";
16348
16378
  const _export_sfc = (sfc, props) => {
16349
16379
  const target = sfc.__vccOpts || sfc;
16350
16380
  for (const [key, val] of props) {
@@ -16434,8 +16464,8 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
16434
16464
  }, null, 4)
16435
16465
  ], 12, _hoisted_1$c);
16436
16466
  }
16437
- const Triangle = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-70b6f344"]]);
16438
- const Layer_vue_vue_type_style_index_0_scoped_4a52def5_lang = "";
16467
+ const Triangle = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-c7bb62b7"]]);
16468
+ const Layer_vue_vue_type_style_index_0_scoped_2e7e0eb0_lang = "";
16439
16469
  const _sfc_main$c = {
16440
16470
  name: "Layer",
16441
16471
  emits: ["update:modelValue", "show", "shown", "hidden"],
@@ -17064,8 +17094,8 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
17064
17094
  _: 3
17065
17095
  }, 8, ["name", "onEnter", "onAfterEnter", "onAfterLeave"]);
17066
17096
  }
17067
- const Layer = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c], ["__scopeId", "data-v-4a52def5"]]);
17068
- const Tooltip_vue_vue_type_style_index_0_scoped_5293a020_lang = "";
17097
+ const Layer = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c], ["__scopeId", "data-v-2e7e0eb0"]]);
17098
+ const Tooltip_vue_vue_type_style_index_0_scoped_3b8ba3fe_lang = "";
17069
17099
  const _sfc_main$b = {
17070
17100
  name: "Tooltip",
17071
17101
  props: {
@@ -17144,8 +17174,8 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
17144
17174
  }, 8, ["modelValue", "node"])
17145
17175
  ], 34);
17146
17176
  }
17147
- const Tooltip = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-5293a020"]]);
17148
- const Icon_vue_vue_type_style_index_0_scoped_5ed6cd4d_lang = "";
17177
+ const Tooltip = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-3b8ba3fe"]]);
17178
+ const Icon_vue_vue_type_style_index_0_scoped_c5a1759c_lang = "";
17149
17179
  const _sfc_main$a = {
17150
17180
  name: "Icon",
17151
17181
  props: {
@@ -17161,8 +17191,8 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
17161
17191
  class: normalizeClass(["editify-icon", "editify-icon-" + $props.value])
17162
17192
  }, null, 2);
17163
17193
  }
17164
- const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a], ["__scopeId", "data-v-5ed6cd4d"]]);
17165
- const Button_vue_vue_type_style_index_0_scoped_5928b86d_lang = "";
17194
+ const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a], ["__scopeId", "data-v-c5a1759c"]]);
17195
+ const Button_vue_vue_type_style_index_0_scoped_762c27cb_lang = "";
17166
17196
  const _sfc_main$9 = {
17167
17197
  name: "Button",
17168
17198
  emits: ["operate", "layerShow", "layerShown", "layerHidden"],
@@ -17526,8 +17556,8 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
17526
17556
  ], 2)
17527
17557
  ]);
17528
17558
  }
17529
- const Button = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9], ["__scopeId", "data-v-5928b86d"]]);
17530
- const Checkbox_vue_vue_type_style_index_0_scoped_a5c85ca2_lang = "";
17559
+ const Button = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9], ["__scopeId", "data-v-762c27cb"]]);
17560
+ const Checkbox_vue_vue_type_style_index_0_scoped_c7ef2a61_lang = "";
17531
17561
  const _sfc_main$8 = {
17532
17562
  name: "Checkbox",
17533
17563
  emits: ["update:modelValue", "change"],
@@ -17656,8 +17686,8 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
17656
17686
  }, null, 8, _hoisted_3$7)) : createCommentVNode("", true)
17657
17687
  ], 2);
17658
17688
  }
17659
- const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-a5c85ca2"]]);
17660
- const Colors_vue_vue_type_style_index_0_scoped_0827adbe_lang = "";
17689
+ const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-c7ef2a61"]]);
17690
+ const Colors_vue_vue_type_style_index_0_scoped_38cf6d98_lang = "";
17661
17691
  const _sfc_main$7 = {
17662
17692
  name: "Colors",
17663
17693
  emits: ["change"],
@@ -17739,8 +17769,8 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
17739
17769
  ])
17740
17770
  ]);
17741
17771
  }
17742
- const Colors = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7], ["__scopeId", "data-v-0827adbe"]]);
17743
- const Toolbar_vue_vue_type_style_index_0_scoped_95d8d583_lang = "";
17772
+ const Colors = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7], ["__scopeId", "data-v-38cf6d98"]]);
17773
+ const Toolbar_vue_vue_type_style_index_0_scoped_f7f61935_lang = "";
17744
17774
  const _sfc_main$6 = {
17745
17775
  name: "Toolbar",
17746
17776
  emits: ["update:modelValue"],
@@ -19321,8 +19351,8 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
19321
19351
  _: 1
19322
19352
  }, 8, ["modelValue", "node", "onShow", "useRange"]);
19323
19353
  }
19324
- const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-95d8d583"]]);
19325
- const InsertLink_vue_vue_type_style_index_0_scoped_a9191be1_lang = "";
19354
+ const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-f7f61935"]]);
19355
+ const InsertLink_vue_vue_type_style_index_0_scoped_f572cc8f_lang = "";
19326
19356
  const _sfc_main$5 = {
19327
19357
  name: "InsertLink",
19328
19358
  emits: ["insert"],
@@ -19432,8 +19462,8 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
19432
19462
  ])
19433
19463
  ]);
19434
19464
  }
19435
- const InsertLink = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-a9191be1"]]);
19436
- const InsertImage_vue_vue_type_style_index_0_scoped_0f2f6ae4_lang = "";
19465
+ const InsertLink = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-f572cc8f"]]);
19466
+ const InsertImage_vue_vue_type_style_index_0_scoped_c50cf629_lang = "";
19437
19467
  const _sfc_main$4 = {
19438
19468
  name: "InsertImage",
19439
19469
  emits: ["change", "insert"],
@@ -19643,8 +19673,8 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
19643
19673
  ]))
19644
19674
  ]);
19645
19675
  }
19646
- const InsertImage = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-0f2f6ae4"]]);
19647
- const InsertVideo_vue_vue_type_style_index_0_scoped_a99ffa99_lang = "";
19676
+ const InsertImage = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-c50cf629"]]);
19677
+ const InsertVideo_vue_vue_type_style_index_0_scoped_ede2dc10_lang = "";
19648
19678
  const _sfc_main$3 = {
19649
19679
  name: "InsertVideo",
19650
19680
  emits: ["change", "insert"],
@@ -19854,8 +19884,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
19854
19884
  ]))
19855
19885
  ]);
19856
19886
  }
19857
- const InsertVideo = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-a99ffa99"]]);
19858
- const InsertTable_vue_vue_type_style_index_0_scoped_227e119e_lang = "";
19887
+ const InsertVideo = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-ede2dc10"]]);
19888
+ const InsertTable_vue_vue_type_style_index_0_scoped_4ea2b077_lang = "";
19859
19889
  const _sfc_main$2 = {
19860
19890
  name: "InsertTable",
19861
19891
  emits: ["insert"],
@@ -19938,7 +19968,7 @@ const _sfc_main$2 = {
19938
19968
  }
19939
19969
  }
19940
19970
  };
19941
- const _withScopeId = (n) => (pushScopeId("data-v-227e119e"), n = n(), popScopeId(), n);
19971
+ const _withScopeId = (n) => (pushScopeId("data-v-4ea2b077"), n = n(), popScopeId(), n);
19942
19972
  const _hoisted_1$2 = { class: "editify-table" };
19943
19973
  const _hoisted_2$1 = ["onMouseenter", "onClick"];
19944
19974
  const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", null, null, -1));
@@ -19968,8 +19998,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
19968
19998
  ])
19969
19999
  ]);
19970
20000
  }
19971
- const InsertTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-227e119e"]]);
19972
- const Menu_vue_vue_type_style_index_0_scoped_25262a69_lang = "";
20001
+ const InsertTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-4ea2b077"]]);
20002
+ const Menu_vue_vue_type_style_index_0_scoped_e320272f_lang = "";
19973
20003
  const _sfc_main$1 = {
19974
20004
  name: "Menu",
19975
20005
  props: {
@@ -21330,8 +21360,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
21330
21360
  }), 256))
21331
21361
  ], 14, _hoisted_1$1);
21332
21362
  }
21333
- const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-25262a69"]]);
21334
- const Editify_vue_vue_type_style_index_0_scoped_8d0f0eb2_lang = "";
21363
+ const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-e320272f"]]);
21364
+ const Editify_vue_vue_type_style_index_0_scoped_40da9f9a_lang = "";
21335
21365
  const _sfc_main = {
21336
21366
  name: "editify",
21337
21367
  props: { ...editorProps },
@@ -22069,7 +22099,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
22069
22099
  ], 2)) : createCommentVNode("", true)
22070
22100
  ], 2);
22071
22101
  }
22072
- const Editify = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8d0f0eb2"]]);
22102
+ const Editify = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-40da9f9a"]]);
22073
22103
  const iconfont = "";
22074
22104
  const en_US = {
22075
22105
  textWrapUp: "Up feed",
@@ -22252,7 +22282,7 @@ const i18n = (locale) => {
22252
22282
  return translations[locale][key];
22253
22283
  };
22254
22284
  };
22255
- const version = "0.1.2";
22285
+ const version = "0.1.3";
22256
22286
  const install = (app, props) => {
22257
22287
  const locale = (props ? props.locale : "zh_CN") || "zh_CN";
22258
22288
  app.provide("$editTrans", i18n(locale));
@@ -22265,6 +22295,7 @@ const stdin_default = {
22265
22295
  };
22266
22296
  export {
22267
22297
  AlexElement,
22298
+ Editify,
22268
22299
  stdin_default as default,
22269
22300
  install,
22270
22301
  version