diff --git a/build.properties.d/00_default.properties b/build.properties.d/00_default.properties index 54ed87cf3b073cae57f19ba72e03df23a4f1f0fd..535a6c846a5c39c48937dee43f087501f43285ae 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 0000000000000000000000000000000000000000..edd328ac5bd7059cf04e9eef0ac96a687e615e86 --- /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); + } +});