4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>The source code</title>
6 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
7 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
8 <style type="text/css">
9 .highlight { display: block; background-color: #ddd; }
11 <script type="text/javascript">
12 function highlight() {
13 document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
17 <body onload="prettyPrint(); highlight();">
18 <pre class="prettyprint lang-js"><span id='Ext-layout-component-field-HtmlEditor'>/**
20 * @class Ext.layout.component.field.HtmlEditor
21 * @extends Ext.layout.component.field.Field
22 * Layout class for {@link Ext.form.field.HtmlEditor} fields. Sizes the toolbar, textarea, and iframe elements.
26 Ext.define('Ext.layout.component.field.HtmlEditor', {
27 extend: 'Ext.layout.component.field.Field',
28 alias: ['layout.htmleditor'],
32 sizeBodyContents: function(width, height) {
35 bodyEl = owner.bodyEl,
36 toolbar = owner.getToolbar(),
37 textarea = owner.textareaEl,
38 iframe = owner.iframeEl,
41 if (Ext.isNumber(width)) {
42 width -= bodyEl.getFrameWidth('lr');
44 toolbar.setWidth(width);
45 textarea.setWidth(width);
46 iframe.setWidth(width);
48 // If fixed height, subtract toolbar height from the input area height
49 if (Ext.isNumber(height)) {
50 editorHeight = height - toolbar.getHeight() - bodyEl.getFrameWidth('tb');
51 textarea.setHeight(editorHeight);
52 iframe.setHeight(editorHeight);