mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-26 16:45:01 +00:00
Ajout de commentaires supplémentaires aux motifs
This commit is contained in:
@@ -2,31 +2,31 @@ import { createApp } from "vue";
|
||||
import CommentEditor from "ChillMainAssets/vuejs/_components/CommentEditor/CommentEditor.vue";
|
||||
|
||||
const ckeditorFields: NodeListOf<HTMLTextAreaElement> =
|
||||
document.querySelectorAll("textarea[ckeditor]");
|
||||
document.querySelectorAll("textarea[ckeditor]");
|
||||
ckeditorFields.forEach((field: HTMLTextAreaElement): void => {
|
||||
const content = field.value;
|
||||
const div = document.createElement("div");
|
||||
const content = field.value;
|
||||
const div = document.createElement("div");
|
||||
|
||||
if (field.parentNode !== null) {
|
||||
field.parentNode.insertBefore(div, field);
|
||||
} else {
|
||||
throw "parent is null";
|
||||
}
|
||||
if (field.parentNode !== null) {
|
||||
field.parentNode.insertBefore(div, field);
|
||||
} else {
|
||||
throw "parent is null";
|
||||
}
|
||||
|
||||
createApp({
|
||||
components: { CommentEditor },
|
||||
template: `<comment-editor v-model="content" @update:modelValue="handleInput"></comment-editor>`,
|
||||
data() {
|
||||
return {
|
||||
content,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleInput() {
|
||||
field.value = this.content;
|
||||
},
|
||||
},
|
||||
}).mount(div);
|
||||
createApp({
|
||||
components: { CommentEditor },
|
||||
template: `<comment-editor v-model="content" @update:modelValue="handleInput"></comment-editor>`,
|
||||
data() {
|
||||
return {
|
||||
content,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleInput() {
|
||||
field.value = this.content;
|
||||
},
|
||||
},
|
||||
}).mount(div);
|
||||
|
||||
field.style.display = "none";
|
||||
field.style.display = "none";
|
||||
});
|
||||
|
Reference in New Issue
Block a user