vue-editify 0.1.19 → 0.1.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. package/README.md +3 -3
  2. package/examples/App.vue +102 -62
  3. package/examples/main.ts +4 -4
  4. package/lib/components/button/button.vue.d.ts +11 -11
  5. package/lib/components/checkbox/checkbox.vue.d.ts +8 -8
  6. package/lib/components/colors/colors.vue.d.ts +4 -4
  7. package/lib/components/icon/icon.vue.d.ts +1 -1
  8. package/lib/components/insertImage/insertImage.vue.d.ts +9 -9
  9. package/lib/components/insertLink/insertLink.vue.d.ts +2 -2
  10. package/lib/components/insertTable/insertTable.vue.d.ts +2 -2
  11. package/lib/components/insertVideo/insertVideo.vue.d.ts +9 -9
  12. package/lib/components/layer/layer.vue.d.ts +9 -9
  13. package/lib/components/menu/menu.vue.d.ts +4 -4
  14. package/lib/components/toolbar/toolbar.vue.d.ts +9 -9
  15. package/lib/components/tooltip/tooltip.vue.d.ts +1 -1
  16. package/lib/components/triangle/triangle.vue.d.ts +4 -4
  17. package/lib/core/tool.d.ts +35 -35
  18. package/lib/editify/editify.vue.d.ts +68 -68
  19. package/lib/editify.es.js +57 -46
  20. package/lib/editify.umd.js +1 -1
  21. package/lib/index.d.ts +1 -1
  22. package/lib/style.css +1 -1
  23. package/package.json +45 -45
  24. package/src/components/button/button.less +145 -145
  25. package/src/components/button/button.vue +197 -197
  26. package/src/components/button/props.ts +95 -95
  27. package/src/components/checkbox/checkbox.less +84 -84
  28. package/src/components/checkbox/checkbox.vue +68 -68
  29. package/src/components/checkbox/props.ts +49 -49
  30. package/src/components/colors/colors.less +75 -75
  31. package/src/components/colors/colors.vue +36 -36
  32. package/src/components/colors/props.ts +29 -29
  33. package/src/components/icon/icon.less +14 -14
  34. package/src/components/icon/icon.vue +12 -12
  35. package/src/components/icon/props.ts +11 -11
  36. package/src/components/insertImage/insertImage.less +135 -135
  37. package/src/components/insertImage/insertImage.vue +146 -146
  38. package/src/components/insertImage/props.ts +43 -43
  39. package/src/components/insertLink/insertLink.less +64 -64
  40. package/src/components/insertLink/insertLink.vue +58 -58
  41. package/src/components/insertLink/props.ts +16 -16
  42. package/src/components/insertTable/insertTable.less +54 -54
  43. package/src/components/insertTable/insertTable.vue +85 -85
  44. package/src/components/insertTable/props.ts +27 -27
  45. package/src/components/insertVideo/insertVideo.less +135 -135
  46. package/src/components/insertVideo/insertVideo.vue +146 -146
  47. package/src/components/insertVideo/props.ts +43 -43
  48. package/src/components/layer/layer.less +49 -49
  49. package/src/components/layer/layer.vue +598 -598
  50. package/src/components/layer/props.ts +71 -71
  51. package/src/components/menu/menu.less +63 -63
  52. package/src/components/menu/menu.vue +1569 -1569
  53. package/src/components/menu/props.ts +17 -17
  54. package/src/components/toolbar/props.ts +35 -35
  55. package/src/components/toolbar/toolbar.less +89 -89
  56. package/src/components/toolbar/toolbar.vue +1101 -1101
  57. package/src/components/tooltip/props.ts +21 -21
  58. package/src/components/tooltip/tooltip.less +23 -23
  59. package/src/components/tooltip/tooltip.vue +37 -37
  60. package/src/components/triangle/props.ts +26 -26
  61. package/src/components/triangle/triangle.less +79 -79
  62. package/src/components/triangle/triangle.vue +65 -65
  63. package/src/core/function.ts +1150 -1144
  64. package/src/core/rule.ts +259 -259
  65. package/src/core/tool.ts +1137 -1137
  66. package/src/css/base.less +30 -30
  67. package/src/css/hljs.less +54 -54
  68. package/src/editify/editify.less +405 -404
  69. package/src/editify/editify.vue +810 -803
  70. package/src/editify/props.ts +156 -156
  71. package/src/hljs/index.ts +197 -197
  72. package/src/icon/iconfont.css +219 -219
  73. package/src/index.ts +32 -32
  74. package/src/locale/en_US.ts +88 -88
  75. package/src/locale/index.ts +12 -12
  76. package/src/locale/zh_CN.ts +88 -88
  77. package/tsconfig.json +27 -27
  78. package/tsconfig.node.json +11 -11
  79. package/vite-env.d.ts +1 -1
  80. package/vite.config.ts +42 -42
package/lib/editify.es.js CHANGED
@@ -3539,7 +3539,7 @@ class AlexEditor {
3539
3539
  this.insertElement(text);
3540
3540
  this.range.anchor.moveToEnd(text);
3541
3541
  this.range.focus.moveToEnd(text);
3542
- this.emit("insertParagraph", null, inblock);
3542
+ this.emit("insertParagraph", inblock, inblock);
3543
3543
  } else if (inblock.behavior == "block") {
3544
3544
  if (this.range.anchor.offset == 0 && !(previousElement && inblock.isContains(previousElement))) {
3545
3545
  const paragraph = inblock.clone(false);
@@ -3579,7 +3579,7 @@ class AlexEditor {
3579
3579
  this.insertElement(text);
3580
3580
  this.range.anchor.moveToEnd(text);
3581
3581
  this.range.focus.moveToEnd(text);
3582
- this.emit("insertParagraph", null, block);
3582
+ this.emit("insertParagraph", block, block);
3583
3583
  } else {
3584
3584
  if (this.range.anchor.offset == 0 && !(previousElement && block.isContains(previousElement))) {
3585
3585
  const paragraph = block.clone(false);
@@ -18815,9 +18815,15 @@ const elementIsInTask = (element2) => {
18815
18815
  return false;
18816
18816
  };
18817
18817
  const isList = function(element2, ordered = false) {
18818
+ if (element2.isEmpty()) {
18819
+ return false;
18820
+ }
18818
18821
  return element2.parsedom == "div" && element2.hasMarks() && element2.marks["data-editify-list"] == (ordered ? "ol" : "ul");
18819
18822
  };
18820
18823
  const isTask = function(element2) {
18824
+ if (element2.isEmpty()) {
18825
+ return false;
18826
+ }
18821
18827
  return element2.parsedom == "div" && element2.hasMarks() && element2.marks.hasOwnProperty("data-editify-task");
18822
18828
  };
18823
18829
  const hasPreInRange = (editor, dataRangeCaches) => {
@@ -20003,7 +20009,7 @@ const _export_sfc = (sfc, props) => {
20003
20009
  }
20004
20010
  return target;
20005
20011
  };
20006
- const Triangle = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-c92dc653"]]);
20012
+ const Triangle = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-e1abc967"]]);
20007
20013
  const LayerProps = {
20008
20014
  //是否显示
20009
20015
  modelValue: {
@@ -20607,7 +20613,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
20607
20613
  createElementVNode("div", {
20608
20614
  ref_key: "wrapRef",
20609
20615
  ref: wrapRef,
20610
- class: normalizeClass(["editify-layer-wrap", { border: _ctx.border }]),
20616
+ class: normalizeClass(["editify-layer-wrap", { "editify-border": _ctx.border }]),
20611
20617
  style: normalizeStyle(wrapStyle.value)
20612
20618
  }, [
20613
20619
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
@@ -20619,7 +20625,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
20619
20625
  };
20620
20626
  }
20621
20627
  });
20622
- const Layer = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-a390950f"]]);
20628
+ const Layer = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-09578d83"]]);
20623
20629
  const TooltipProps = {
20624
20630
  //提示内容
20625
20631
  content: {
@@ -20662,7 +20668,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
20662
20668
  };
20663
20669
  return (_ctx, _cache) => {
20664
20670
  return openBlock(), createElementBlock("div", {
20665
- class: normalizeClass(["editify-tooltip", { block: _ctx.block }])
20671
+ class: normalizeClass(["editify-tooltip", { "editify-block": _ctx.block }])
20666
20672
  }, [
20667
20673
  createElementVNode("div", {
20668
20674
  ref_key: "targetRef",
@@ -20695,7 +20701,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
20695
20701
  };
20696
20702
  }
20697
20703
  });
20698
- const Tooltip = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-92a30ff2"]]);
20704
+ const Tooltip = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-7b5e30d1"]]);
20699
20705
  const IconProps = {
20700
20706
  //图标值
20701
20707
  value: {
@@ -20717,7 +20723,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
20717
20723
  };
20718
20724
  }
20719
20725
  });
20720
- const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-a639e8dc"]]);
20726
+ const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-6e00035b"]]);
20721
20727
  const ButtonProps = {
20722
20728
  //按钮类型
20723
20729
  type: {
@@ -20947,7 +20953,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
20947
20953
  return (_ctx, _cache) => {
20948
20954
  return openBlock(), createElementBlock("div", _hoisted_1$9, [
20949
20955
  createElementVNode("div", {
20950
- class: normalizeClass(["editify-button-wrap", { "right-border": _ctx.rightBorder, "left-border": _ctx.leftBorder }])
20956
+ class: normalizeClass(["editify-button-wrap", { "editify-right-border": _ctx.rightBorder, "editify-left-border": _ctx.leftBorder }])
20951
20957
  }, [
20952
20958
  createVNode(Tooltip, {
20953
20959
  content: _ctx.title,
@@ -20958,7 +20964,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
20958
20964
  ref_key: "btnRef",
20959
20965
  ref: btnRef,
20960
20966
  style: normalizeStyle(btnStyle.value),
20961
- class: normalizeClass(["editify-button-el", { disabled: _ctx.disabled, active: _ctx.active }]),
20967
+ class: normalizeClass(["editify-button-el", { "editify-disabled": _ctx.disabled, "editify-active": _ctx.active }]),
20962
20968
  onMouseenter: _cache[0] || (_cache[0] = ($event) => status.value = "hover"),
20963
20969
  onMouseleave: _cache[1] || (_cache[1] = ($event) => status.value = null),
20964
20970
  onMousedown: _cache[2] || (_cache[2] = ($event) => status.value = "down"),
@@ -20971,7 +20977,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
20971
20977
  _ctx.type == "select" || _ctx.type == "display" ? (openBlock(), createBlock(Icon, {
20972
20978
  key: 2,
20973
20979
  value: "caret-down",
20974
- class: normalizeClass(["editify-button-caret", { rotate: show.value }])
20980
+ class: normalizeClass(["editify-button-caret", { "editify-rotate": show.value }])
20975
20981
  }, null, 8, ["class"])) : createCommentVNode("", true)
20976
20982
  ], 38)
20977
20983
  ]),
@@ -21004,7 +21010,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
21004
21010
  (openBlock(true), createElementBlock(Fragment, null, renderList(cmpOptions.value, (item) => {
21005
21011
  return openBlock(), createElementBlock("div", {
21006
21012
  onClick: ($event) => select(item),
21007
- class: normalizeClass(["editify-button-option", { active: _ctx.type == "display" ? item.value == parseDisplayConfig.value.value : false }]),
21013
+ class: normalizeClass(["editify-button-option", { "editify-active": _ctx.type == "display" ? item.value == parseDisplayConfig.value.value : false }]),
21008
21014
  style: normalizeStyle(item.style || "")
21009
21015
  }, [
21010
21016
  _ctx.$slots.option ? renderSlot(_ctx.$slots, "option", {
@@ -21029,7 +21035,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
21029
21035
  };
21030
21036
  }
21031
21037
  });
21032
- const Button = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-73d00a90"]]);
21038
+ const Button = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-3656b737"]]);
21033
21039
  const CheckboxProps = {
21034
21040
  //是否禁用
21035
21041
  disabled: {
@@ -21124,7 +21130,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
21124
21130
  };
21125
21131
  return (_ctx, _cache) => {
21126
21132
  return openBlock(), createElementBlock("label", {
21127
- class: normalizeClass(["editify-checkbox", { disabled: _ctx.disabled }])
21133
+ class: normalizeClass(["editify-checkbox", { "editify-disabled": _ctx.disabled }])
21128
21134
  }, [
21129
21135
  _ctx.placement == "left" && _ctx.label ? (openBlock(), createElementBlock("span", {
21130
21136
  key: 0,
@@ -21140,7 +21146,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
21140
21146
  type: "checkbox"
21141
21147
  }, null, 40, _hoisted_2$7),
21142
21148
  createElementVNode("span", {
21143
- class: normalizeClass(["editify-checkbox-item", { reverse: !_ctx.color, round: _ctx.round, checked: check.value && !_ctx.disabled }]),
21149
+ class: normalizeClass(["editify-checkbox-item", { "editify-reverse": !_ctx.color, "editify-round": _ctx.round, "editify-checked": check.value && !_ctx.disabled }]),
21144
21150
  style: normalizeStyle(itemStyle.value)
21145
21151
  }, [
21146
21152
  createVNode(Icon, {
@@ -21158,7 +21164,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
21158
21164
  };
21159
21165
  }
21160
21166
  });
21161
- const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-dae0c4a0"]]);
21167
+ const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-d99c609b"]]);
21162
21168
  const ColorsProps = {
21163
21169
  //颜色数组
21164
21170
  data: {
@@ -21211,7 +21217,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
21211
21217
  createElementVNode("div", _hoisted_2$6, [
21212
21218
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (item) => {
21213
21219
  return openBlock(), createElementBlock("div", {
21214
- class: normalizeClass(["editify-color", { active: _ctx.value == item.value }]),
21220
+ class: normalizeClass(["editify-color", { "editify-active": _ctx.value == item.value }]),
21215
21221
  style: normalizeStyle({ borderColor: _ctx.value == item.value ? _ctx.color : "" })
21216
21222
  }, [
21217
21223
  createVNode(Tooltip, {
@@ -21235,7 +21241,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
21235
21241
  };
21236
21242
  }
21237
21243
  });
21238
- const Colors = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-8be143e5"]]);
21244
+ const Colors = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-514d2263"]]);
21239
21245
  const ToolbarProps = {
21240
21246
  //是否显示
21241
21247
  modelValue: {
@@ -22765,7 +22771,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
22765
22771
  };
22766
22772
  }
22767
22773
  });
22768
- const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-485ac49d"]]);
22774
+ const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-44b03ca9"]]);
22769
22775
  const InsertLinkProps = {
22770
22776
  //主题色
22771
22777
  color: {
@@ -22868,7 +22874,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
22868
22874
  };
22869
22875
  }
22870
22876
  });
22871
- const InsertLink = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-f5a1fedb"]]);
22877
+ const InsertLink = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-f5a2ce93"]]);
22872
22878
  const InsertImageProps = {
22873
22879
  //主题色
22874
22880
  color: {
@@ -23020,16 +23026,16 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
23020
23026
  createElementVNode("div", _hoisted_2$3, [
23021
23027
  createElementVNode("div", {
23022
23028
  onClick: _cache[0] || (_cache[0] = ($event) => current.value = "upload"),
23023
- class: normalizeClass(["editify-image-header-item", { active: current.value == "upload" }]),
23029
+ class: normalizeClass(["editify-image-header-item", { "editify-active": current.value == "upload" }]),
23024
23030
  style: normalizeStyle(activeStyle.value("upload"))
23025
23031
  }, toDisplayString(unref($editTrans)("uploadImage")), 7),
23026
23032
  createElementVNode("div", {
23027
23033
  onClick: _cache[1] || (_cache[1] = ($event) => current.value = "remote"),
23028
- class: normalizeClass(["editify-image-header-item", { active: current.value == "remote" }]),
23034
+ class: normalizeClass(["editify-image-header-item", { "editify-active": current.value == "remote" }]),
23029
23035
  style: normalizeStyle(activeStyle.value("remote"))
23030
23036
  }, toDisplayString(unref($editTrans)("remoteImage")), 7),
23031
23037
  createElementVNode("div", {
23032
- class: normalizeClass(["editify-image-header-slider", current.value]),
23038
+ class: normalizeClass(["editify-image-header-slider", "editify-" + current.value]),
23033
23039
  style: normalizeStyle({ backgroundColor: _ctx.color || "" })
23034
23040
  }, null, 6)
23035
23041
  ]),
@@ -23066,7 +23072,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
23066
23072
  };
23067
23073
  }
23068
23074
  });
23069
- const InsertImage = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-876ab662"]]);
23075
+ const InsertImage = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-735f42e9"]]);
23070
23076
  const InsertVideoProps = {
23071
23077
  //主题色
23072
23078
  color: {
@@ -23218,16 +23224,16 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
23218
23224
  createElementVNode("div", _hoisted_2$2, [
23219
23225
  createElementVNode("div", {
23220
23226
  onClick: _cache[0] || (_cache[0] = ($event) => current.value = "upload"),
23221
- class: normalizeClass(["editify-video-header-item", { active: current.value == "upload" }]),
23227
+ class: normalizeClass(["editify-video-header-item", { "editify-active": current.value == "upload" }]),
23222
23228
  style: normalizeStyle(activeStyle.value("upload"))
23223
23229
  }, toDisplayString(unref($editTrans)("uploadVideo")), 7),
23224
23230
  createElementVNode("div", {
23225
23231
  onClick: _cache[1] || (_cache[1] = ($event) => current.value = "remote"),
23226
- class: normalizeClass(["editify-video-header-item", { active: current.value == "remote" }]),
23232
+ class: normalizeClass(["editify-video-header-item", { "editify-active": current.value == "remote" }]),
23227
23233
  style: normalizeStyle(activeStyle.value("remote"))
23228
23234
  }, toDisplayString(unref($editTrans)("remoteVideo")), 7),
23229
23235
  createElementVNode("div", {
23230
- class: normalizeClass(["editify-video-header-slider", current.value]),
23236
+ class: normalizeClass(["editify-video-header-slider", "editify-" + current.value]),
23231
23237
  style: normalizeStyle({ backgroundColor: _ctx.color || "" })
23232
23238
  }, null, 6)
23233
23239
  ]),
@@ -23264,7 +23270,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
23264
23270
  };
23265
23271
  }
23266
23272
  });
23267
- const InsertVideo = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4131f4db"]]);
23273
+ const InsertVideo = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4d375427"]]);
23268
23274
  const InsertTableProps = {
23269
23275
  //主题色
23270
23276
  color: {
@@ -23282,7 +23288,7 @@ const InsertTableProps = {
23282
23288
  default: 10
23283
23289
  }
23284
23290
  };
23285
- const _withScopeId = (n) => (pushScopeId("data-v-49473a7c"), n = n(), popScopeId(), n);
23291
+ const _withScopeId = (n) => (pushScopeId("data-v-9a40c4f5"), n = n(), popScopeId(), n);
23286
23292
  const _hoisted_1$2 = { class: "editify-table" };
23287
23293
  const _hoisted_2$1 = ["onMouseenter", "onClick"];
23288
23294
  const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", null, null, -1));
@@ -23358,7 +23364,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23358
23364
  return openBlock(), createElementBlock("tr", null, [
23359
23365
  (openBlock(true), createElementBlock(Fragment, null, renderList(row, (column) => {
23360
23366
  return openBlock(), createElementBlock("td", {
23361
- class: normalizeClass({ inside: column.inside }),
23367
+ class: normalizeClass({ "editify-inside": column.inside }),
23362
23368
  onMouseenter: ($event) => changeTableSize(column),
23363
23369
  onClick: ($event) => createTable(column)
23364
23370
  }, _hoisted_4$1, 42, _hoisted_2$1);
@@ -23373,7 +23379,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23373
23379
  };
23374
23380
  }
23375
23381
  });
23376
- const InsertTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-49473a7c"]]);
23382
+ const InsertTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-9a40c4f5"]]);
23377
23383
  const MenuProps = {
23378
23384
  //菜单栏配置
23379
23385
  config: {
@@ -24701,7 +24707,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
24701
24707
  });
24702
24708
  return (_ctx, _cache) => {
24703
24709
  return openBlock(), createElementBlock("div", {
24704
- class: normalizeClass(["editify-menu", { border: menuShowBorder.value, source: unref(isSourceView) && menuMode.value == "inner", fullscreen: unref(isFullScreen) }]),
24710
+ class: normalizeClass(["editify-menu", { "editify-border": menuShowBorder.value, "editify-source": unref(isSourceView) && menuMode.value == "inner", "editify-fullscreen": unref(isFullScreen) }]),
24705
24711
  "data-editify-mode": menuMode.value,
24706
24712
  style: normalizeStyle(_ctx.config.style || "")
24707
24713
  }, [
@@ -24715,7 +24721,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
24715
24721
  };
24716
24722
  }
24717
24723
  });
24718
- const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-98216646"]]);
24724
+ const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-67392864"]]);
24719
24725
  const EditifyProps = {
24720
24726
  //国际化语言类型
24721
24727
  locale: {
@@ -25506,12 +25512,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25506
25512
  }, 0);
25507
25513
  };
25508
25514
  const handleInsertParagraph = (element2, previousElement) => {
25509
- if (previousElement.isOnlyHasBreak() && element2.isOnlyHasBreak()) {
25510
- if (previousElement.parsedom != AlexElement.BLOCK_NODE) {
25511
- elementToParagraph(previousElement);
25512
- editor.value.range.anchor.moveToStart(previousElement);
25513
- editor.value.range.focus.moveToStart(previousElement);
25514
- element2.toEmpty();
25515
+ if (!element2.isEqual(previousElement)) {
25516
+ if (previousElement.isOnlyHasBreak() && element2.isOnlyHasBreak()) {
25517
+ if (previousElement.parsedom != AlexElement.BLOCK_NODE) {
25518
+ elementToParagraph(previousElement);
25519
+ editor.value.range.anchor.moveToStart(previousElement);
25520
+ editor.value.range.focus.moveToStart(previousElement);
25521
+ element2.toEmpty();
25522
+ }
25523
+ }
25524
+ if (isTask(element2)) {
25525
+ element2.marks["data-editify-task"] = "uncheck";
25515
25526
  }
25516
25527
  }
25517
25528
  emits("insertparagraph", value.value);
@@ -25682,7 +25693,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25682
25693
  });
25683
25694
  return (_ctx, _cache) => {
25684
25695
  return openBlock(), createElementBlock("div", {
25685
- class: normalizeClass(["editify", { fullscreen: isFullScreen.value, autoheight: !isFullScreen.value && _ctx.autoheight }]),
25696
+ class: normalizeClass(["editify", { "editify-fullscreen": isFullScreen.value, "editify-autoheight": !isFullScreen.value && _ctx.autoheight }]),
25686
25697
  ref_key: "elRef",
25687
25698
  ref: elRef
25688
25699
  }, [
@@ -25696,13 +25707,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25696
25707
  createElementVNode("div", {
25697
25708
  ref_key: "bodyRef",
25698
25709
  ref: bodyRef,
25699
- class: normalizeClass(["editify-body", { border: showBorder.value, menu_inner: menuConfig.value.use && menuConfig.value.mode == "inner" }]),
25710
+ class: normalizeClass(["editify-body", { "editify-border": showBorder.value, "editify-menu_inner": menuConfig.value.use && menuConfig.value.mode == "inner" }]),
25700
25711
  "data-editify-uid": unref(instance).uid
25701
25712
  }, [
25702
25713
  createElementVNode("div", {
25703
25714
  ref_key: "contentRef",
25704
25715
  ref: contentRef,
25705
- class: normalizeClass(["editify-content", { placeholder: showPlaceholder.value, disabled: _ctx.disabled }]),
25716
+ class: normalizeClass(["editify-content", { "editify-placeholder": showPlaceholder.value, "editify-disabled": _ctx.disabled }]),
25706
25717
  onKeydown: handleEditorKeydown,
25707
25718
  onClick: handleEditorClick,
25708
25719
  onCompositionstart: _cache[0] || (_cache[0] = ($event) => isInputChinese.value = true),
@@ -25713,7 +25724,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25713
25724
  key: 0,
25714
25725
  value: value.value,
25715
25726
  readonly: "",
25716
- class: "editify-source"
25727
+ class: "editify-sourceview"
25717
25728
  }, null, 8, _hoisted_3)) : createCommentVNode("", true),
25718
25729
  createVNode(Toolbar, {
25719
25730
  ref_key: "toolbarRef",
@@ -25728,7 +25739,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25728
25739
  ], 10, _hoisted_1),
25729
25740
  _ctx.showWordLength ? (openBlock(), createElementBlock("div", {
25730
25741
  key: 1,
25731
- class: normalizeClass(["editify-footer", { fullscreen: isFullScreen.value && !isSourceView.value }]),
25742
+ class: normalizeClass(["editify-footer", { "editify-fullscreen": isFullScreen.value && !isSourceView.value }]),
25732
25743
  ref_key: "footerRef",
25733
25744
  ref: footerRef
25734
25745
  }, [
@@ -25738,8 +25749,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25738
25749
  };
25739
25750
  }
25740
25751
  });
25741
- const Editify = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8c5f5909"]]);
25742
- const version = "0.1.19";
25752
+ const Editify = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3f87ab8c"]]);
25753
+ const version = "0.1.21";
25743
25754
  const install = (app) => {
25744
25755
  app.component(Editify.name, Editify);
25745
25756
  };