goodteditor-ui 1.0.102 → 1.0.104

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goodteditor-ui",
3
- "version": "1.0.102",
3
+ "version": "1.0.104",
4
4
  "main": "index.js",
5
5
  "homepage": "https://goodt-ui.netlify.app/",
6
6
  "scripts": {
@@ -168,8 +168,8 @@ export default {
168
168
  */
169
169
  setValue(value) {
170
170
  this.$el.textContent = value;
171
- this.valueLast = value;
172
171
  if (value !== this.valueLast) {
172
+ this.valueLast = value;
173
173
  this.$emit('input', value);
174
174
  this.$emit('change', value);
175
175
  }
@@ -201,7 +201,7 @@ export default {
201
201
  * @param {KeyboardEvent} event
202
202
  */
203
203
  onKeyup({ target }) {
204
- this.valueDirty = target.textContent.trim();
204
+ this.valueDirty = target.textContent.replace(/\s+/g, ' ').trim();
205
205
  }
206
206
  }
207
207
  };
@@ -47,6 +47,7 @@
47
47
 
48
48
  <script>
49
49
  import { Editor, EditorContent } from '@tiptap/vue-2';
50
+ import { cloneDeep } from 'lodash';
50
51
 
51
52
  import { debounce } from '../utils/Helpers';
52
53
  import { resolveExtensions } from './extensions';
@@ -186,14 +187,14 @@ export default {
186
187
 
187
188
  this.editor = new Editor({
188
189
  content: value,
189
- extensions: resolveExtensions({
190
+ extensions: cloneDeep(resolveExtensions({
190
191
  ...(bubbleMenu && {
191
192
  bubbleMenu: {
192
193
  element: $refs.menu,
193
194
  ...bubbleMenu
194
195
  }
195
196
  })
196
- }),
197
+ })),
197
198
  autofocus,
198
199
  editorProps: {
199
200
  attributes: {