23
23
24
24
### General description
25
25
26
- This component displays contenteditable div with automated @ autocompletion [at] .
26
+ This component displays contenteditable div with automated `@` [at] autocompletion and `:` [colon] emoji autocompletion .
27
27
Note you need to register the [tooltip directive](https://nextcloud-vue-components.netlify.app/#/Directives) in your entry file.
28
28
29
29
### Examples
@@ -36,7 +36,7 @@ Note you need to register the [tooltip directive](https://nextcloud-vue-componen
36
36
:auto-complete="autoComplete"
37
37
:maxlength="100"
38
38
:user-data="userData"
39
- placeholder="Try mentioning the user Test01"
39
+ placeholder="Try mentioning user @ Test01 or inserting emoji :smile "
40
40
@submit="onSubmit" />
41
41
<br>
42
42
@@ -46,7 +46,7 @@ Note you need to register the [tooltip directive](https://nextcloud-vue-componen
46
46
:maxlength="400"
47
47
:multiline="true"
48
48
:user-data="userData"
49
- placeholder="Try mentioning the user Test01"
49
+ placeholder="Try mentioning user @ Test01 or inserting emoji :smile "
50
50
@submit="onSubmit" />
51
51
<br>
52
52
<br>
@@ -167,7 +167,7 @@ export default {
167
167
168
168
placeholder: {
169
169
type: String,
170
- default: t('Write message, @ to mention someone …'),
170
+ default: t('Write message, @ to mention someone, : for emoji autocompletion …'),
171
171
},
172
172
173
173
autoComplete: {
@@ -214,6 +214,14 @@ export default {
214
214
type: Number,
215
215
default: null,
216
216
},
217
+
218
+ /**
219
+ * Enable or disable emoji autocompletion
220
+ */
221
+ emojiAutocomplete: {
222
+ type: Boolean,
223
+ default: true,
224
+ },
217
225
},
218
226
219
227
data() {
@@ -336,8 +344,10 @@ export default {
336
344
this.autocompleteTribute = new Tribute(this.autocompleteOptions)
337
345
this.autocompleteTribute.attach(this.$el)
338
346
339
- this.emojiTribute = new Tribute(this.emojiOptions)
340
- this.emojiTribute.attach(this.$el)
347
+ if (this.emojiAutocomplete) {
348
+ this.emojiTribute = new Tribute(this.emojiOptions)
349
+ this.emojiTribute.attach(this.$el)
350
+ }
341
351
342
352
// Update default value
343
353
this.updateContent(this.value)
0 commit comments