diff --git a/application/Espo/Resources/defaults/config.php b/application/Espo/Resources/defaults/config.php index a397e85854..cb3969eba7 100644 --- a/application/Espo/Resources/defaults/config.php +++ b/application/Espo/Resources/defaults/config.php @@ -286,5 +286,6 @@ return [ 'phoneNumberInternational' => true, 'phoneNumberPreferredCountryList' => ['us', 'de'], 'adminUpgradeDisabled' => false, + 'wysiwygCodeEditorDisabled' => false, 'isInstalled' => false, ]; diff --git a/client/src/views/fields/wysiwyg.js b/client/src/views/fields/wysiwyg.js index 5dd36d289d..b81e0f7833 100644 --- a/client/src/views/fields/wysiwyg.js +++ b/client/src/views/fields/wysiwyg.js @@ -175,6 +175,9 @@ class WysiwygFieldView extends TextFieldView { setupToolbar() { this.buttons = {}; + const codeviewName = this.getConfig().get('wysiwygCodeEditorDisabled') ? + 'codeview' : 'aceCodeview'; + this.toolbar = this.params.toolbar || this.toolbar || [ ['style', ['style']], ['style', ['bold', 'italic', 'underline', 'clear']], @@ -183,7 +186,7 @@ class WysiwygFieldView extends TextFieldView { ['para', ['ul', 'ol', 'paragraph']], ['height', ['height']], ['table', ['espoTable', 'espoLink', 'espoImage', 'hr']], - ['misc', [/*'codeview', */'aceCodeview', 'fullscreen']], + ['misc', [codeviewName, 'fullscreen']], ]; if (this.params.toolbar) {