@afeefa/vue-app 0.0.102 → 0.0.104
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.104
|
package/package.json
CHANGED
@@ -113,6 +113,15 @@
|
|
113
113
|
:editor="editor"
|
114
114
|
:class="['a-rich-text-editor', {editorFocus}]"
|
115
115
|
/>
|
116
|
+
<v-text-field
|
117
|
+
v-show="false"
|
118
|
+
ref="input"
|
119
|
+
v-model="currentValueStripped"
|
120
|
+
:label="label"
|
121
|
+
:rules="validationRules"
|
122
|
+
v-bind="$attrs"
|
123
|
+
v-on="$listeners"
|
124
|
+
/>
|
116
125
|
</div>
|
117
126
|
</template>
|
118
127
|
|
@@ -137,7 +146,7 @@ import { Color } from '@tiptap/extension-color'
|
|
137
146
|
import Highlight from '@tiptap/extension-highlight'
|
138
147
|
|
139
148
|
@Component({
|
140
|
-
props: ['value', 'validator', 'focus'],
|
149
|
+
props: ['value', 'validator', 'focus', 'label'],
|
141
150
|
components: {
|
142
151
|
EditorContent
|
143
152
|
}
|
@@ -167,9 +176,6 @@ export default class ARichTextArea extends Vue {
|
|
167
176
|
mounted () {
|
168
177
|
this.editorFocus = !!this.focus
|
169
178
|
|
170
|
-
if (this.validator) {
|
171
|
-
this.$refs.input.validate(true)
|
172
|
-
}
|
173
179
|
|
174
180
|
this.editor = new Editor({
|
175
181
|
content: this.internalValue,
|
@@ -230,6 +236,12 @@ export default class ARichTextArea extends Vue {
|
|
230
236
|
}
|
231
237
|
return this.validator.getParams().max || false
|
232
238
|
}
|
239
|
+
|
240
|
+
get currentValueStripped () {
|
241
|
+
if (this.editor) {
|
242
|
+
return this.editor.state.doc.textContent
|
243
|
+
}
|
244
|
+
}
|
233
245
|
}
|
234
246
|
</script>
|
235
247
|
|