parent
4d95e14769
commit
83d05b719b
@ -18,7 +18,7 @@
|
||||
@mousedown="handleMousedown"
|
||||
@blur="handleBlur"
|
||||
@input="handleInput"
|
||||
v-html="$xss(element.propValue)"
|
||||
v-html="element.propValue"
|
||||
/>
|
||||
<div
|
||||
v-if="!canEdit"
|
||||
@ -28,7 +28,7 @@
|
||||
@mousedown="handleMousedown"
|
||||
@blur="handleBlur"
|
||||
@input="handleInput"
|
||||
v-html="$xss(element.propValue)"
|
||||
v-html="element.propValue"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -37,7 +37,7 @@
|
||||
>
|
||||
<div
|
||||
:style="{ verticalAlign: element.style.verticalAlign }"
|
||||
v-html="$xss(textInfo)"
|
||||
v-html="textInfo"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -45,6 +45,7 @@
|
||||
<script>
|
||||
import { keycodes } from '@/components/canvas/utils/shortcutKey.js'
|
||||
import { mapState } from 'vuex'
|
||||
import xssCheck from 'xss'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@ -139,16 +140,12 @@ export default {
|
||||
},
|
||||
|
||||
handleBlur(e) {
|
||||
this.element.propValue = e.target.innerHTML || ' '
|
||||
this.element.propValue = xssCheck(e.target.innerHTML || ' ')
|
||||
this.canEdit = false
|
||||
},
|
||||
|
||||
setEdit() {
|
||||
this.canEdit = true
|
||||
this.selectText(this.$refs.text)
|
||||
},
|
||||
|
||||
selectText(element) {
|
||||
},
|
||||
|
||||
removeSelectText() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user