From b9329aa41774491becc54dd11795c3830214b615 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 18 Jan 2024 09:46:31 +0100 Subject: [PATCH] temp --- public/js/components/Notiz/Notiz.js | 44 +++++++++++++++++++++++++++-- public/js/components/tinymce.js.php | 22 +++++++++++++++ 2 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 public/js/components/tinymce.js.php diff --git a/public/js/components/Notiz/Notiz.js b/public/js/components/Notiz/Notiz.js index 6850feff8..0882b41b5 100644 --- a/public/js/components/Notiz/Notiz.js +++ b/public/js/components/Notiz/Notiz.js @@ -1,4 +1,5 @@ import VueDatePicker from '../vueDatepicker.js.php'; +import tinymce from '../tinymce.js.php'; import PvAutoComplete from "../../../../index.ci.php/public/js/components/primevue/autocomplete/autocomplete.esm.min.js"; import File from '../Form/Upload/File.js'; import {CoreRESTClient} from "../../RESTClient"; @@ -7,7 +8,8 @@ export default { components: { VueDatePicker, File, - PvAutoComplete + PvAutoComplete, + tinymce }, props: [ 'typeId', @@ -129,6 +131,26 @@ export default { this.filteredMitarbeiter = CoreRESTClient.getData(result.data); }); }, + methods: { + initTinyMCE() { + //console.log(" before initfile"); + tinymce.init({ + selector: '#editor', // Use the ID of your textarea or div + plugins: ['autoresize', 'lists'], + toolbar: 'undo redo | styleselect | bold italic | bullist numlist', + autoresize_bottom_margin: 16, + setup: (editor) => { + // for additional setup or customization here + }, + }); + }, + }, + }, + mounted() { + this.initTinyMCE(); + }, + beforeDestroy() { + tinymce.get('editor').destroy(); }, template: ` @@ -150,13 +172,31 @@ export default { -
+
+
+ + +
+ + + + +
+
+
diff --git a/public/js/components/tinymce.js.php b/public/js/components/tinymce.js.php new file mode 100644 index 000000000..101306442 --- /dev/null +++ b/public/js/components/tinymce.js.php @@ -0,0 +1,22 @@ +