Skip to content
Snippets Groups Projects
Commit fff82e71 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

don't lose the toolbar, fixes #2373

Closes #2373

Merge request studip/studip!1824
parent 7b3c5c6e
No related branches found
No related tags found
No related merge requests found
<template> <template>
<textarea :name="name" ref="textarea" <textarea :name="name"
v-bind="$attrs" v-on="$listeners"></textarea> ref="textarea"
v-model="content"
></textarea>
</template> </template>
<script> <script>
export default { export default {
name: 'textarea-with-toolbar', name: 'textarea-with-toolbar',
props: { props: {
value: String,
name: { name: {
type: String, type: String,
required: false required: false
} }
}, },
computed: {
content: {
get() {
return this.value;
},
set(newContent) {
this.$emit('input', newContent);
}
}
},
mounted () { mounted () {
$(this.$refs.textarea).addToolbar(); $(this.$refs.textarea).addToolbar();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment