From 63691c071563b106a9ba45ad54c4aa7c0c2afcac Mon Sep 17 00:00:00 2001
From: fspreck <f.spreckelsen@indiscale.com>
Date: Mon, 29 Nov 2021 16:12:35 +0100
Subject: [PATCH] DRAFT: Start ext_wysiwyg draft

---
 build.properties.d/00_default.properties |  3 +++
 src/core/js/ext_editmode_wysiwyg_text.js | 34 ++++++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 src/core/js/ext_editmode_wysiwyg_text.js

diff --git a/build.properties.d/00_default.properties b/build.properties.d/00_default.properties
index 54ed87cf..535a6c84 100644
--- a/build.properties.d/00_default.properties
+++ b/build.properties.d/00_default.properties
@@ -60,6 +60,8 @@ BUILD_MODULE_USER_MANAGEMENT_CHANGE_OWN_PASSWORD_REALM=CaosDB
 BUILD_MODULE_EXT_RESOLVE_REFERENCES=ENABLED
 BUILD_EXT_REFERENCES_CUSTOM_RESOLVER=person_reference
 
+BUILD_MODULE_EXT_EDITMODE_WYSIWYG_TEXT=DISABLED
+
 ##############################################################################
 # Navbar properties
 ##############################################################################
@@ -174,4 +176,5 @@ MODULE_DEPENDENCIES=(
     ext_qrcode.js
     form_panel.js
     ckeditor.js
+    ext_editmode_wysiwyg_text.js
 )
diff --git a/src/core/js/ext_editmode_wysiwyg_text.js b/src/core/js/ext_editmode_wysiwyg_text.js
new file mode 100644
index 00000000..edd328ac
--- /dev/null
+++ b/src/core/js/ext_editmode_wysiwyg_text.js
@@ -0,0 +1,34 @@
+/*
+ * This file is a part of the CaosDB Project.
+ *
+ * Copyright (C) 2021 IndiScale GmbH <info@indiscale.com>
+ * Copyright (C) 2021 Florian Spreckelsen <f.spreckelsen@indiscale.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+"use strict";
+
+/**
+ * Replaces textareas in the edit mode by a wysiwyg editor
+ */
+var ext_editmode_wysiwyg_text = function ($, logger) {
+
+}($, log.getLogger("ext_editmode_wysiwyg_text"));
+
+$(document).ready(() => {
+    if ("${BUILD_MODULE_EXT_EDITMODE_WYSIWYG_TEXT}" == "ENABLED") {
+        caosdb_modules.register(ext_editmode_wysiwyg_text);
+    }
+});
-- 
GitLab