Skip to content

Commit

Permalink
Debug #320
Browse files Browse the repository at this point in the history
  • Loading branch information
carlobeltrame committed Apr 18, 2024
1 parent 0551a73 commit 7dc87fb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion resources/js/components/feedback/FeedbackEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default {
},
onCreate: ({ editor }) => {
let creating = true
console.log('onCreate', editor, editor.on)
editor.on('update', ({editor, transaction}) => {
this.currentValue = editor.getJSON()
console.log('FeedbackEditor input', this.currentValue)
Expand All @@ -91,7 +92,16 @@ export default {
}
creating = false
})
}
},
onUpdate: ({ editor, transaction }) => {
this.currentValue = editor.getJSON()
console.log('FeedbackEditor input (onUpdate)', this.currentValue)
this.$emit('input', this.currentValue)
if (!this.isRemoteChange(transaction)) {
console.log('FeedbackEditor localinput (onUpdate)', this.currentValue)
this.$emit('localinput', this.currentValue)
}
},
})
const emptyDocument = editor.getJSON()
Expand Down

0 comments on commit 7dc87fb

Please sign in to comment.