vuewrite 0.0.22-b → 0.0.22

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.
Files changed (2) hide show
  1. package/dist/vuewrite.js +4 -3
  2. package/package.json +1 -1
package/dist/vuewrite.js CHANGED
@@ -898,11 +898,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
898
898
  return;
899
899
  } else {
900
900
  for (let i = store.blocks.length; i < newValue.length; i++) {
901
- store.blocks.push({ id: uid(), text: "" });
901
+ store.blocks.push({ id: uid(), text: "", styles: [] });
902
902
  }
903
903
  store.blocks.length = newValue.length;
904
904
  for (let i = 0; i < newValue.length; i++) {
905
- store.blocks[i] = { ...newValue[i], id: uid() };
905
+ store.blocks[i].text = newValue[i].text;
906
+ store.blocks[i].type = newValue[i].type;
907
+ store.blocks[i].styles = newValue[i].styles;
906
908
  }
907
909
  }
908
910
  }, { immediate: true });
@@ -923,7 +925,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
923
925
  emit("update:styles", styles);
924
926
  emit("update:modelValue", modelValue);
925
927
  } else {
926
- modelValue = store.blocks;
927
928
  emit("update:modelValue", store.blocks);
928
929
  }
929
930
  }, { deep: true });
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "vuewrite",
3
3
  "description": "Rich Text Editor based on Vue3 reactivity",
4
4
  "private": false,
5
- "version": "0.0.22-b",
5
+ "version": "0.0.22",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "author": "den59k",