wysiwyg param to disable code editor

This commit is contained in:
Yuri Kuznetsov
2024-01-23 11:11:06 +02:00
parent 5c308bb60c
commit 339fbffbb7
2 changed files with 5 additions and 1 deletions
@@ -286,5 +286,6 @@ return [
'phoneNumberInternational' => true,
'phoneNumberPreferredCountryList' => ['us', 'de'],
'adminUpgradeDisabled' => false,
'wysiwygCodeEditorDisabled' => false,
'isInstalled' => false,
];
+4 -1
View File
@@ -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) {