3 * @class Ext.layout.component.field.HtmlEditor
4 * @extends Ext.layout.component.field.Field
5 * Layout class for {@link Ext.form.field.HtmlEditor} fields. Sizes the toolbar, textarea, and iframe elements.
9 Ext.define('Ext.layout.component.field.HtmlEditor', {
10 extend: 'Ext.layout.component.field.Field',
11 alias: ['layout.htmleditor'],
15 sizeBodyContents: function(width, height) {
18 bodyEl = owner.bodyEl,
19 toolbar = owner.getToolbar(),
20 textarea = owner.textareaEl,
21 iframe = owner.iframeEl,
24 if (Ext.isNumber(width)) {
25 width -= bodyEl.getFrameWidth('lr');
27 toolbar.setWidth(width);
28 textarea.setWidth(width);
29 iframe.setWidth(width);
31 // If fixed height, subtract toolbar height from the input area height
32 if (Ext.isNumber(height)) {
33 editorHeight = height - toolbar.getHeight() - bodyEl.getFrameWidth('tb');
34 textarea.setHeight(editorHeight);
35 iframe.setHeight(editorHeight);