mirror of
https://github.com/anatolykopyl/vue-highlights.git
synced 2026-03-26 12:55:35 +00:00
Compare commits
2 Commits
ad6f22dfde
...
b0a3890db4
| Author | SHA1 | Date | |
|---|---|---|---|
| b0a3890db4 | |||
| 2bbd11a7ed |
18
dist/vue-highlights.common.js
vendored
18
dist/vue-highlights.common.js
vendored
@@ -1751,16 +1751,21 @@ function src_autoLink (text, options) {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
focused: false,
|
||||
body: ''
|
||||
focused: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
valueModel: {
|
||||
get () { return this.value },
|
||||
set (value) {
|
||||
this.$emit('input', value)
|
||||
}
|
||||
},
|
||||
showPlaceholder () {
|
||||
return !this.body.replace(/^\s*\n/gm, '').length
|
||||
return !this.valueModel.replace(/^\s*\n/gm, '').length
|
||||
},
|
||||
computedBody () {
|
||||
return highlight(this.body, {
|
||||
return highlight(this.valueModel, {
|
||||
extractUrlsWithoutProtocol: this.extractUrlsWithoutProtocol,
|
||||
mentionsWithDots: this.mentionsWithDots
|
||||
})
|
||||
@@ -1789,7 +1794,7 @@ function src_autoLink (text, options) {
|
||||
},
|
||||
clear () {
|
||||
this.$refs.mbody.innerText = ''
|
||||
this.body = ''
|
||||
this.valueModel = ''
|
||||
},
|
||||
onKeyUp (e) {
|
||||
const keysToIgnore = ['Shift', 'Meta', 'Control', 'Alt', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']
|
||||
@@ -1799,8 +1804,7 @@ function src_autoLink (text, options) {
|
||||
if (e.key === 'Enter') {
|
||||
caretPosition++
|
||||
}
|
||||
this.body = e.target.innerText
|
||||
this.$emit('input', this.body)
|
||||
this.valueModel = e.target.innerText
|
||||
this.$nextTick(() => {
|
||||
this.setCaretPos(caretPosition)
|
||||
})
|
||||
|
||||
2
dist/vue-highlights.common.js.map
vendored
2
dist/vue-highlights.common.js.map
vendored
File diff suppressed because one or more lines are too long
18
dist/vue-highlights.umd.js
vendored
18
dist/vue-highlights.umd.js
vendored
@@ -1760,16 +1760,21 @@ function src_autoLink (text, options) {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
focused: false,
|
||||
body: ''
|
||||
focused: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
valueModel: {
|
||||
get () { return this.value },
|
||||
set (value) {
|
||||
this.$emit('input', value)
|
||||
}
|
||||
},
|
||||
showPlaceholder () {
|
||||
return !this.body.replace(/^\s*\n/gm, '').length
|
||||
return !this.valueModel.replace(/^\s*\n/gm, '').length
|
||||
},
|
||||
computedBody () {
|
||||
return highlight(this.body, {
|
||||
return highlight(this.valueModel, {
|
||||
extractUrlsWithoutProtocol: this.extractUrlsWithoutProtocol,
|
||||
mentionsWithDots: this.mentionsWithDots
|
||||
})
|
||||
@@ -1798,7 +1803,7 @@ function src_autoLink (text, options) {
|
||||
},
|
||||
clear () {
|
||||
this.$refs.mbody.innerText = ''
|
||||
this.body = ''
|
||||
this.valueModel = ''
|
||||
},
|
||||
onKeyUp (e) {
|
||||
const keysToIgnore = ['Shift', 'Meta', 'Control', 'Alt', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']
|
||||
@@ -1808,8 +1813,7 @@ function src_autoLink (text, options) {
|
||||
if (e.key === 'Enter') {
|
||||
caretPosition++
|
||||
}
|
||||
this.body = e.target.innerText
|
||||
this.$emit('input', this.body)
|
||||
this.valueModel = e.target.innerText
|
||||
this.$nextTick(() => {
|
||||
this.setCaretPos(caretPosition)
|
||||
})
|
||||
|
||||
2
dist/vue-highlights.umd.js.map
vendored
2
dist/vue-highlights.umd.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/vue-highlights.umd.min.js
vendored
2
dist/vue-highlights.umd.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/vue-highlights.umd.min.js.map
vendored
2
dist/vue-highlights.umd.min.js.map
vendored
File diff suppressed because one or more lines are too long
18
src/index.js
18
src/index.js
@@ -31,16 +31,21 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
focused: false,
|
||||
body: ''
|
||||
focused: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
valueModel: {
|
||||
get () { return this.value },
|
||||
set (value) {
|
||||
this.$emit('input', value)
|
||||
}
|
||||
},
|
||||
showPlaceholder () {
|
||||
return !this.body.replace(/^\s*\n/gm, '').length
|
||||
return !this.valueModel.replace(/^\s*\n/gm, '').length
|
||||
},
|
||||
computedBody () {
|
||||
return highlight(this.body, {
|
||||
return highlight(this.valueModel, {
|
||||
extractUrlsWithoutProtocol: this.extractUrlsWithoutProtocol,
|
||||
mentionsWithDots: this.mentionsWithDots
|
||||
})
|
||||
@@ -69,7 +74,7 @@ export default {
|
||||
},
|
||||
clear () {
|
||||
this.$refs.mbody.innerText = ''
|
||||
this.body = ''
|
||||
this.valueModel = ''
|
||||
},
|
||||
onKeyUp (e) {
|
||||
const keysToIgnore = ['Shift', 'Meta', 'Control', 'Alt', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']
|
||||
@@ -79,8 +84,7 @@ export default {
|
||||
if (e.key === 'Enter') {
|
||||
caretPosition++
|
||||
}
|
||||
this.body = e.target.innerText
|
||||
this.$emit('input', this.body)
|
||||
this.valueModel = e.target.innerText
|
||||
this.$nextTick(() => {
|
||||
this.setCaretPos(caretPosition)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user