wysiwyg param to disable code editor
This commit is contained in:
@@ -286,5 +286,6 @@ return [
|
||||
'phoneNumberInternational' => true,
|
||||
'phoneNumberPreferredCountryList' => ['us', 'de'],
|
||||
'adminUpgradeDisabled' => false,
|
||||
'wysiwygCodeEditorDisabled' => false,
|
||||
'isInstalled' => false,
|
||||
];
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user