Skip to content

Commit

Permalink
fix: clear value when only a line break is in QuestionEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentauger committed Nov 20, 2024
1 parent 209367d commit e84b38d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions resources/src/components/QuestionEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ function onPaste(e: ClipboardEvent) {
})
editor.value?.runCmd('insertHTML', cleanText)
}
watch(value, (newValue) => {
if (newValue === '<br>') {
value.value = ''
}
})
</script>

<template>
Expand Down

0 comments on commit e84b38d

Please sign in to comment.