It would be nice - for space-saving reasons - to be able to hide the WYSIWYG formatting toolbar.
Setting the `toolbar` param to `null` doesn't have an effect:
However, adding a `hideToolbar` param would allow this to happen:
client/src/views/fields/wysiwyg.js
And thus can be used as follows:
Setting the `toolbar` param to `null` doesn't have an effect:
Code:
this.createField('description', 'views/fields/wysiwyg', {mode: this.mode === 'edit' ? 'edit' : 'list'}, {rows: 3, toolbar: null});
client/src/views/fields/wysiwyg.js
Code:
setup: function () {
Dep.prototype.setup.call(this);
this.hasBodyPlainField = !!~this.getFieldManager().getEntityTypeFieldList(this.model.entityType).indexOf(this.name + 'Plain');
if ('height' in this.params) {
this.height = this.params.height;
}
if ('minHeight' in this.params) {
this.minHeight = this.params.minHeight;
}
this.useIframe = this.params.useIframe || this.useIframe;
this.toolbar = this.params.toolbar || [
['style', ['style']],
['style', ['bold', 'italic', 'underline', 'clear']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']],
['table', ['table', 'link', 'picture', 'hr']],
['misc',['codeview', 'fullscreen']]
];
// Check for the hideToolbar param so we can completely disable the toolbar
if (this.params.hideToolbar) {
this.toolbar = null;
}
...
}
Code:
this.createField('description', 'views/fields/wysiwyg', {mode: this.mode === 'edit' ? 'edit' : 'list'}, {rows: 3, hideToolbar: true});

Comment