-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathExampleRichTextEditor.vue
More file actions
48 lines (45 loc) · 1.25 KB
/
ExampleRichTextEditor.vue
File metadata and controls
48 lines (45 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<template>
<dt-rich-text-editor
v-model="value"
:editable="true"
input-aria-label="this is a descriptive label"
:input-class="$attrs.inputClass"
:output-format="$attrs.outputFormat"
:auto-focus="false"
placeholder="Type here..."
:allow-typing="$attrs.allowTyping"
:link="true"
:mention-suggestion="$attrs.mentionSuggestion"
:channel-suggestion="$attrs.channelSuggestion"
:slash-command-suggestion="$attrs.slashCommandSuggestion"
:allow-blockquote="$attrs.allowBlockquote"
:allow-bold="$attrs.allowBold"
:allow-bullet-list="$attrs.allowBulletList"
:allow-code="$attrs.allowCode"
:allow-codeblock="$attrs.allowCodeblock"
:allow-italic="$attrs.allowItalic"
:allow-strike="$attrs.allowStrike"
:allow-line-breaks="$attrs.allowLineBreaks"
:allow-underline="$attrs.allowUnderline"
:additional-extensions="$attrs.additionalExtensions"
@blur="$attrs.onBlur"
@input="$attrs.onInput"
@focus="$attrs.onFocus"
@enter="$attrs.onEnter"
/>
</template>
<script>
export default {
name: 'ExampleRichTextEditor',
data () {
return {
value: this.$attrs.modelValue,
};
},
watch: {
'$attrs.modelValue' (value) {
this.value = value;
},
},
};
</script>