Merge branch 'main' of https://dev.azure.com/freeleaps/freeleaps2-frontend/_git/freeleaps2-frontend
This commit is contained in:
commit
9b43cc794a
@ -7,7 +7,8 @@
|
||||
ref="editor"
|
||||
v-html="content"
|
||||
@blur="updateAction"
|
||||
@mouseup.stop="selectionChange"
|
||||
@mousedown.stop="selectionStart"
|
||||
@mouseup.stop="selectionEnd"
|
||||
/>
|
||||
<div v-if="!disabled" class="editor-control" :style="editorCtrlStyle">
|
||||
<div v-for="(item, index) in iconList" :key="index" class="editor-item">
|
||||
@ -186,7 +187,10 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectionChange(e) {
|
||||
selectionStart() {
|
||||
this.$refs.editor.blur()
|
||||
},
|
||||
selectionEnd(e) {
|
||||
const sel = window.getSelection()
|
||||
if (sel && sel.type === 'Range') {
|
||||
// this.selectedRange = sel.getRangeAt(0)
|
||||
@ -307,11 +311,7 @@ export default {
|
||||
|
||||
updateAction($event) {
|
||||
let html = $event.target.innerHTML || ''
|
||||
//TODO: need to revise afte confirming the timeout approach is working
|
||||
this.$emit('update:content', html)
|
||||
// setTimeout(() => {
|
||||
// this.$emit('update:content', html)
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,7 +36,6 @@ import {
|
||||
import { signinActionEnum } from '@/types/index'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
name: 'FrontDoor',
|
||||
props: {},
|
||||
data() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user