use ckeditor

This commit is contained in:
Boris Waaub 2024-05-08 18:03:50 +02:00
parent 19af0feb57
commit 1d33ae1e39

View File

@ -11,8 +11,15 @@
<div v-if="activeTab === 'comment'">
<form @submit.prevent="createComment">
<textarea v-model="content" class="form-control" id="content" rows="3"
:placeholder="$t('comment.label')"></textarea>
<ckeditor
name="content"
:placeholder="$t('comment.content')"
:editor="editor"
v-model="content"
tag-name="textarea">
</ckeditor>
<!-- <textarea v-model="content" class="form-control" id="content" rows="3"
:placeholder="$t('comment.label')"></textarea> -->
<div class="d-flex justify-content-end p-2">
<button class="btn btn-chill-green text-white float-right" type="submit">
@ -84,6 +91,8 @@
import { computed, defineComponent, inject, ref } from "vue";
import { useI18n } from "vue-i18n";
import { useStore } from "vuex";
import CKEditor from '@ckeditor/ckeditor5-vue';
import ClassicEditor from "../../../../../../../ChillMainBundle/Resources/public/module/ckeditor5";
// Types
import { User, UserGroup, UserGroupOrUser } from "../../../../../../../ChillMainBundle/Resources/public/types";
@ -98,6 +107,7 @@ export default defineComponent({
components: {
MotiveSelectorComponent,
AddresseeSelectorComponent,
ckeditor: CKEditor.component,
},
setup() {
const store = useStore();
@ -162,6 +172,7 @@ export default defineComponent({
addressees,
users,
content,
editor: ClassicEditor,
createMotive,
createComment,
setAdressees,