+
@@ -38,6 +38,7 @@ export default defineComponent({
isSimple: Boolean,
},
setup(props, { emit }) {
+ console.log("im loaded too")
const { isSimple } = toRefs(props);
const content = ref("");
const classicEditor = ClassicEditor;
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/CommentEditor/index.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/CommentEditor/index.js
deleted file mode 100644
index f543a27fb..000000000
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/CommentEditor/index.js
+++ /dev/null
@@ -1,31 +0,0 @@
-import { createApp, reactive } from "vue";
-import App from "./App.vue";
-import {_createI18n} from "ChillMainAssets/vuejs/_js/i18n";
-import { appMessages } from "ChillMainAssets/vuejs/CommentEditor/i18n";
-
-const i18n = _createI18n(appMessages);
-
-// Global reactive state to handle editorMode
-const globalState = reactive({
- isSimple: localStorage.getItem('editorMode') === 'simple'
-});
-
-// Watch for changes to `localStorage` and update the state
-window.addEventListener('storage', () => {
- globalState.isSimple = localStorage.getItem('editorMode') === 'simple';
-});
-
-const commentWidgets = document.querySelectorAll('[id^="comment-widget"]');
-commentWidgets.forEach((commentContainer) => {
- const app = createApp({
- template: `
`
- });
-
- const fieldName = commentContainer.dataset.fieldname;
-
- app.use(i18n)
- .provide('globalState', globalState)
- .provide( 'fieldName', fieldName)
- .component("app", App)
- .mount(commentContainer);
-});
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig
index 15794b9f7..30230005e 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig
@@ -214,7 +214,9 @@
{% block private_comment_widget %}
{% for entry in form %}
- {{ form_widget(entry) }}
+
{% endfor %}
{% endblock %}
@@ -224,7 +226,9 @@
{% block comment_widget %}
{% for entry in form %}
- {{ form_widget(entry) }}
+
{% endfor %}
{% endblock comment_widget %}