8 Commits

Author SHA1 Message Date
2bbd11a7ed Fixed two way binding 2022-07-09 19:49:29 +03:00
be21eb3897 Chores 2022-07-09 14:16:55 +03:00
Pedro G. Galaviz
8ebd12db49 Merge pull request #15 from pggalaviz/dependabot/npm_and_yarn/handlebars-4.7.7
Bump handlebars from 4.5.3 to 4.7.7
2021-05-20 14:51:35 -05:00
Pedro G. Galaviz
4edb700cd8 Merge pull request #18 from pggalaviz/dependabot/npm_and_yarn/lodash-4.17.21
Bump lodash from 4.17.20 to 4.17.21
2021-05-11 19:32:55 -05:00
dependabot[bot]
3588880c50 Bump lodash from 4.17.20 to 4.17.21
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-11 23:14:13 +00:00
Pedro G. Galaviz
32a4700f1d Merge pull request #16 from pggalaviz/dependabot/npm_and_yarn/url-parse-1.5.1
Bump url-parse from 1.4.7 to 1.5.1
2021-05-10 08:14:56 -05:00
dependabot[bot]
a71b28e934 Bump url-parse from 1.4.7 to 1.5.1
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.1.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 12:58:07 +00:00
dependabot[bot]
148d8a9355 Bump handlebars from 4.5.3 to 4.7.7
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.5.3 to 4.7.7.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.5.3...v4.7.7)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-09 10:27:52 +00:00
2 changed files with 22043 additions and 2123 deletions

24134
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -27,16 +27,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
})
}
@@ -64,15 +69,14 @@ export default {
},
clear () {
this.$refs.mbody.innerText = ''
this.body = ''
this.valueModel = ''
},
onKeyUp (e) {
let caretPosition = this.getCaretPos()
if (e.keyCode === 13) { // Enter key
caretPosition++
}
this.body = e.target.innerText
this.$emit('input', this.body)
this.valueModel = e.target.innerText
this.$nextTick(() => {
this.setCaretPos(caretPosition)
})