@fastkit/vui 0.7.48 → 0.7.49

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/dist/vui.cjs.js CHANGED
@@ -2822,7 +2822,10 @@ const VWysiwygEditor = vue.defineComponent({
2822
2822
 
2823
2823
  vue.watch(() => inputControl.canOperation, updateEditable);
2824
2824
  vue.watch(() => props.modelValue, modelValue => {
2825
- editor.value && editor.value.commands.setContent(modelValue == null ? '' : modelValue);
2825
+ const $editor = editor.value;
2826
+ if (!$editor) return;
2827
+ $editor.commands.setContent(modelValue == null ? '' : modelValue);
2828
+ textRef.value = $editor.getText();
2826
2829
  });
2827
2830
  const editor = vue3.useEditor({
2828
2831
  onCreate: ({
@@ -2840,6 +2843,7 @@ const VWysiwygEditor = vue.defineComponent({
2840
2843
  onUpdate: ev => {
2841
2844
  inputControl.value = ev.editor.getHTML();
2842
2845
  textRef.value = ev.editor.getText();
2846
+ console.log(textRef.value);
2843
2847
  },
2844
2848
  autofocus: props.autofocus,
2845
2849
  content: props.modelValue,
@@ -2822,7 +2822,10 @@ const VWysiwygEditor = vue.defineComponent({
2822
2822
 
2823
2823
  vue.watch(() => inputControl.canOperation, updateEditable);
2824
2824
  vue.watch(() => props.modelValue, modelValue => {
2825
- editor.value && editor.value.commands.setContent(modelValue == null ? '' : modelValue);
2825
+ const $editor = editor.value;
2826
+ if (!$editor) return;
2827
+ $editor.commands.setContent(modelValue == null ? '' : modelValue);
2828
+ textRef.value = $editor.getText();
2826
2829
  });
2827
2830
  const editor = vue3.useEditor({
2828
2831
  onCreate: ({
@@ -2840,6 +2843,7 @@ const VWysiwygEditor = vue.defineComponent({
2840
2843
  onUpdate: ev => {
2841
2844
  inputControl.value = ev.editor.getHTML();
2842
2845
  textRef.value = ev.editor.getText();
2846
+ console.log(textRef.value);
2843
2847
  },
2844
2848
  autofocus: props.autofocus,
2845
2849
  content: props.modelValue,
package/dist/vui.mjs CHANGED
@@ -2817,7 +2817,10 @@ const VWysiwygEditor = defineComponent({
2817
2817
 
2818
2818
  watch(() => inputControl.canOperation, updateEditable);
2819
2819
  watch(() => props.modelValue, modelValue => {
2820
- editor.value && editor.value.commands.setContent(modelValue == null ? '' : modelValue);
2820
+ const $editor = editor.value;
2821
+ if (!$editor) return;
2822
+ $editor.commands.setContent(modelValue == null ? '' : modelValue);
2823
+ textRef.value = $editor.getText();
2821
2824
  });
2822
2825
  const editor = useEditor({
2823
2826
  onCreate: ({
@@ -2835,6 +2838,7 @@ const VWysiwygEditor = defineComponent({
2835
2838
  onUpdate: ev => {
2836
2839
  inputControl.value = ev.editor.getHTML();
2837
2840
  textRef.value = ev.editor.getText();
2841
+ console.log(textRef.value);
2838
2842
  },
2839
2843
  autofocus: props.autofocus,
2840
2844
  content: props.modelValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastkit/vui",
3
- "version": "0.7.48",
3
+ "version": "0.7.49",
4
4
  "description": "@fastkit/vui",
5
5
  "buildOptions": {
6
6
  "name": "Vui",
@@ -32,11 +32,11 @@
32
32
  "vue": "^3.2.26"
33
33
  },
34
34
  "dependencies": {
35
- "@fastkit/color-scheme": "0.7.48",
36
- "@fastkit/icon-font": "0.7.48",
37
- "@fastkit/tiny-logger": "0.7.48",
38
- "@fastkit/vite-kit": "0.7.48",
39
- "@fastkit/vue-kit": "0.7.48",
35
+ "@fastkit/color-scheme": "0.7.49",
36
+ "@fastkit/icon-font": "0.7.49",
37
+ "@fastkit/tiny-logger": "0.7.49",
38
+ "@fastkit/vite-kit": "0.7.49",
39
+ "@fastkit/vue-kit": "0.7.49",
40
40
  "@tiptap/extension-link": "^2.0.0-beta.36",
41
41
  "@tiptap/extension-underline": "^2.0.0-beta.23",
42
42
  "@tiptap/starter-kit": "^2.0.0-beta.183",
@@ -99,10 +99,10 @@ export const VWysiwygEditor = defineComponent({
99
99
  watch(
100
100
  () => props.modelValue,
101
101
  (modelValue) => {
102
- editor.value &&
103
- editor.value.commands.setContent(
104
- modelValue == null ? '' : modelValue,
105
- );
102
+ const $editor = editor.value;
103
+ if (!$editor) return;
104
+ $editor.commands.setContent(modelValue == null ? '' : modelValue);
105
+ textRef.value = $editor.getText();
106
106
  },
107
107
  );
108
108
 
@@ -120,6 +120,7 @@ export const VWysiwygEditor = defineComponent({
120
120
  onUpdate: (ev) => {
121
121
  inputControl.value = ev.editor.getHTML();
122
122
  textRef.value = ev.editor.getText();
123
+ console.log(textRef.value);
123
124
  },
124
125
  autofocus: props.autofocus,
125
126
  content: props.modelValue,