diff --git a/package-lock.json b/package-lock.json index 02aca9edba..74614a82cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "dependencies": { "@braintree/sanitize-url": "^6.0.4", "@ckeditor/ckeditor5-vue2": "^3.0.1", - "@hpi-schul-cloud/ckeditor": "0.4.0", + "@hpi-schul-cloud/ckeditor": "^1.0.0", "@lumieducation/h5p-webcomponents": "^9.2.2", "@mdi/js": "^7.3.67", "@types/vuelidate": "^0.7.21", @@ -2050,9 +2050,9 @@ } }, "node_modules/@hpi-schul-cloud/ckeditor": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@hpi-schul-cloud/ckeditor/-/ckeditor-0.4.0.tgz", - "integrity": "sha512-MoE9q5hKfOkWDC4IL3CBsb37cxSw7vyuVpaPFtJUfJrUSJ4WCG+Jz4Y+KVF/HlpVkmGUfvuMZe+4DioN0ff/5w==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@hpi-schul-cloud/ckeditor/-/ckeditor-1.0.0.tgz", + "integrity": "sha512-U9UstGqruAu8aiJYvQf4p9CtyRXrqO2CqgqYPMpTaxXgw5ovMgyg4vMJ22DY5BjwAyAV2NPkSQwWKRuizv+Axg==", "engines": { "node": "18" } @@ -22135,9 +22135,9 @@ } }, "@hpi-schul-cloud/ckeditor": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@hpi-schul-cloud/ckeditor/-/ckeditor-0.4.0.tgz", - "integrity": "sha512-MoE9q5hKfOkWDC4IL3CBsb37cxSw7vyuVpaPFtJUfJrUSJ4WCG+Jz4Y+KVF/HlpVkmGUfvuMZe+4DioN0ff/5w==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@hpi-schul-cloud/ckeditor/-/ckeditor-1.0.0.tgz", + "integrity": "sha512-U9UstGqruAu8aiJYvQf4p9CtyRXrqO2CqgqYPMpTaxXgw5ovMgyg4vMJ22DY5BjwAyAV2NPkSQwWKRuizv+Axg==" }, "@humanwhocodes/config-array": { "version": "0.11.11", diff --git a/package.json b/package.json index 79bea319c2..ba20911cdd 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "dependencies": { "@braintree/sanitize-url": "^6.0.4", "@ckeditor/ckeditor5-vue2": "^3.0.1", - "@hpi-schul-cloud/ckeditor": "0.4.0", + "@hpi-schul-cloud/ckeditor": "^1.0.0", "@lumieducation/h5p-webcomponents": "^9.2.2", "@mdi/js": "^7.3.67", "@types/vuelidate": "^0.7.21", diff --git a/src/components/feature-board-text-element/RichTextContentElementEdit.vue b/src/components/feature-board-text-element/RichTextContentElementEdit.vue index d8cedd4b18..3cf9503924 100644 --- a/src/components/feature-board-text-element/RichTextContentElementEdit.vue +++ b/src/components/feature-board-text-element/RichTextContentElementEdit.vue @@ -6,6 +6,7 @@ :placeholder=" $t('components.cardElement.richTextElement.placeholder').toString() " + type="balloon" mode="simple" @update:value="onUpdateValue" @focus="onFocus" diff --git a/src/components/feature-editor/CKEditor.vue b/src/components/feature-editor/CKEditor.vue index 8d025c65be..25c258db39 100644 --- a/src/components/feature-editor/CKEditor.vue +++ b/src/components/feature-editor/CKEditor.vue @@ -2,8 +2,8 @@ ["classic", "balloon"].includes(value), + default: "classic", + }, mode: { type: String, validator: (value) => ["simple", "regular"].includes(value), @@ -56,6 +61,11 @@ export default defineComponent({ const ck = ref(null); const modelValue = useVModel(props, "value", emit); + const editor = computed(() => { + return props.type === "classic" + ? CustomCKEditor.ClassicEditor + : CustomCKEditor.BalloonEditor; + }); const language = i18n.locale; const charCount = ref(0); @@ -263,6 +273,7 @@ export default defineComponent({ return { ck, + editor, modelValue, CustomCKEditor, config,