Skip to content

Commit 295c3eb

Browse files
Merge pull request #5746 from christianbeeznest/ofaj-21938
Social: Replace text field with TinyMCE editor for post creation - refs BT#21938
2 parents 8132320 + d17dd0b commit 295c3eb

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

assets/vue/components/social/SocialWallPostForm.vue

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<template>
22
<BaseCard plain>
33
<form>
4-
<BaseInputTextWithVuelidate
4+
<BaseTinyEditor
55
v-model="content"
6-
:label="textPlaceholder"
7-
:vuelidate-property="v$.content"
6+
:editor-id="'content-editor'"
7+
:required="true"
8+
:title="textPlaceholder"
9+
:editor-config="editorConfig"
810
class="mb-2"
911
/>
1012

@@ -56,11 +58,11 @@ import BaseCard from "../basecomponents/BaseCard.vue"
5658
import BaseButton from "../basecomponents/BaseButton.vue"
5759
import BaseFileUpload from "../basecomponents/BaseFileUpload.vue"
5860
import BaseCheckbox from "../basecomponents/BaseCheckbox.vue"
59-
import BaseInputTextWithVuelidate from "../basecomponents/BaseInputTextWithVuelidate.vue"
6061
import { useRoute } from "vue-router"
6162
import { useSecurityStore } from "../../store/securityStore"
6263
import socialService from "../../services/socialService"
6364
import { useNotification } from "../../composables/notification"
65+
import BaseTinyEditor from "../basecomponents/BaseTinyEditor.vue"
6466
6567
const emit = defineEmits(["post-created"])
6668
const securityStore = useSecurityStore()
@@ -167,4 +169,11 @@ async function sendPost() {
167169
showErrorNotification("There was an error creating the post")
168170
}
169171
}
172+
173+
// Editor configuration
174+
const editorConfig = computed(() => ({
175+
height: 300,
176+
plugins: "link code",
177+
toolbar: "undo redo | formatselect | bold italic | alignleft aligncenter alignright | code",
178+
}))
170179
</script>

0 commit comments

Comments
 (0)