/javascripts/lib/docs/output/Ext.form.HtmlEditor.html

https://bitbucket.org/ksokmesa/sina-asian · HTML · 1014 lines · 1005 code · 9 blank · 0 comment · 0 complexity · 950fbfc044d4a8040e650803838fda5e MD5 · raw file

Large files are truncated click here to view the full file

  1. <div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.form.HtmlEditor-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>&#13;<a class="inner-link" href="#Ext.form.HtmlEditor-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>&#13;<a class="inner-link" href="#Ext.form.HtmlEditor-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>&#13;<a class="inner-link" href="#Ext.form.HtmlEditor-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>&#13;<a class="bookmark" href="../docs/?class=Ext.form.HtmlEditor"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>&#13;</div><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.util.Observable.html" ext:member="" ext:cls="Ext.util.Observable">Observable</a>&#13;&nbsp;&nbsp;<img src="resources/elbow-end.gif"><a href="output/Ext.Component.html" ext:member="" ext:cls="Ext.Component">Component</a>&#13;&nbsp;&nbsp;&nbsp;&nbsp;<img src="resources/elbow-end.gif"><a href="output/Ext.BoxComponent.html" ext:member="" ext:cls="Ext.BoxComponent">BoxComponent</a>&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="resources/elbow-end.gif"><a href="output/Ext.form.Field.html" ext:member="" ext:cls="Ext.form.Field">Field</a>&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="resources/elbow-end.gif">HtmlEditor</pre></div><h1>Class <a href="source/HtmlEditor.html#cls-Ext.form.HtmlEditor">Ext.form.HtmlEditor</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.form</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/HtmlEditor.html#cls-Ext.form.HtmlEditor">HtmlEditor.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/HtmlEditor.html#cls-Ext.form.HtmlEditor">HtmlEditor</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.form.Field.html" ext:cls="Ext.form.Field" ext:member="">Field</a></td></tr></table><div class="description">Provides a lightweight HTML Editor component. Some toolbar features are not supported by Safari and will be
  2. automatically hidden when needed. These are noted in the config options where appropriate.
  3. <br><br>The editor's toolbar buttons have tooltips defined in the <a href="output/Ext.form.HtmlEditor.html#Ext.form.HtmlEditor-buttonTips" ext:member="buttonTips" ext:cls="Ext.form.HtmlEditor">buttonTips</a> property, but they are not
  4. enabled by default unless the global <a href="output/Ext.QuickTips.html" ext:cls="Ext.QuickTips">Ext.QuickTips</a> singleton is <a href="output/Ext.QuickTips.html#Ext.QuickTips-init" ext:member="init" ext:cls="Ext.QuickTips">initialized</a>.
  5. <br><br><b>Note: The focus/blur and validation marking functionality inherited from Ext.form.Field is NOT
  6. supported by this editor.</b>
  7. <br><br>An Editor is a sensitive component that can't be used in all spots standard fields can be used. Putting an Editor within
  8. any element that has display set to 'none' can cause problems in Safari and Firefox due to their default iframe reloading bugs.
  9. <br><br>Example usage:
  10. <pre><code><i>// Simple example rendered <b>with</b> <b>default</b> options:</i>
  11. Ext.QuickTips.init(); <i>// enable tooltips</i>
  12. <b>new</b> Ext.form.HtmlEditor({
  13. renderTo: Ext.getBody(),
  14. width: 800,
  15. height: 300
  16. });
  17. <i>// Passed via xtype into a container and <b>with</b> custom options:</i>
  18. Ext.QuickTips.init(); <i>// enable tooltips</i>
  19. <b>new</b> Ext.Panel({
  20. title: <em>'HTML Editor'</em>,
  21. renderTo: Ext.getBody(),
  22. width: 600,
  23. height: 300,
  24. frame: true,
  25. layout: <em>'fit'</em>,
  26. items: {
  27. xtype: <em>'htmleditor'</em>,
  28. enableColors: false,
  29. enableAlignments: false
  30. }
  31. });</code></pre></div><div class="hr"></div><a id="Ext.form.HtmlEditor-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.BoxComponent-anchor"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-anchor">anchor</a></b> : String<div class="mdesc"><div class="short">Note: this config is only used when this Component is rendered
  32. by a Container which has been configured to use an Anc...</div><div class="long"><p><b>Note</b>: this config is only used when this Component is rendered
  33. by a Container which has been configured to use an <b><a href="output/Ext.layout.AnchorLayout.html" ext:cls="Ext.layout.AnchorLayout">AnchorLayout</a> (or subclass thereof).</b>
  34. based layout manager, for example:<div class="mdetail-params"><ul>
  35. <li><a href="output/Ext.form.FormPanel.html" ext:cls="Ext.form.FormPanel">Ext.form.FormPanel</a></li>
  36. <li>specifying <code>layout: <em>'anchor'</em> <i>// or <em>'form'</em>, or <em>'absolute'</em></i></code></li>
  37. </ul></div></p>
  38. <p>See <a href="output/Ext.layout.AnchorLayout.html" ext:cls="Ext.layout.AnchorLayout">Ext.layout.AnchorLayout</a>.<a href="output/Ext.layout.AnchorLayout.html#Ext.layout.AnchorLayout-anchor" ext:member="anchor" ext:cls="Ext.layout.AnchorLayout">anchor</a> also.</p></div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#anchor" ext:member="#anchor" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.BoxComponent-autoScroll"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-autoScroll">autoScroll</a></b> : Boolean<div class="mdesc"><div class="short">true to use overflow:'auto' on the components layout element and show scroll bars automatically when
  39. necessary, false...</div><div class="long"><code>true</code> to use overflow:'auto' on the components layout element and show scroll bars automatically when
  40. necessary, <code>false</code> to clip any overflowing content (defaults to <code>false</code>).</div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#autoScroll" ext:member="#autoScroll" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-autoShow"></a><b><a href="source/Component.html#cfg-Ext.Component-autoShow">autoShow</a></b> : Boolean<div class="mdesc"><div class="short">True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
  41. them on render...</div><div class="long">True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
  42. them on render (defaults to false).</div></div></td><td class="msource"><a href="output/Ext.Component.html#autoShow" ext:member="#autoShow" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.BoxComponent-boxMaxHeight"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-boxMaxHeight">boxMaxHeight</a></b> : Number<div class="mdesc"><div class="short">The maximum value in pixels which this BoxComponent will set its height to.
  43. Warning: This will override any size mana...</div><div class="long"><p>The maximum value in pixels which this BoxComponent will set its height to.</p>
  44. <p><b>Warning:</b> This will override any size management applied by layout managers.</p></div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#boxMaxHeight" ext:member="#boxMaxHeight" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.BoxComponent-boxMaxWidth"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-boxMaxWidth">boxMaxWidth</a></b> : Number<div class="mdesc"><div class="short">The maximum value in pixels which this BoxComponent will set its width to.
  45. Warning: This will override any size manag...</div><div class="long"><p>The maximum value in pixels which this BoxComponent will set its width to.</p>
  46. <p><b>Warning:</b> This will override any size management applied by layout managers.</p></div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#boxMaxWidth" ext:member="#boxMaxWidth" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.BoxComponent-boxMinHeight"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-boxMinHeight">boxMinHeight</a></b> : Number<div class="mdesc"><div class="short">The minimum value in pixels which this BoxComponent will set its height to.
  47. Warning: This will override any size mana...</div><div class="long"><p>The minimum value in pixels which this BoxComponent will set its height to.</p>
  48. <p><b>Warning:</b> This will override any size management applied by layout managers.</p></div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#boxMinHeight" ext:member="#boxMinHeight" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.BoxComponent-boxMinWidth"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-boxMinWidth">boxMinWidth</a></b> : Number<div class="mdesc"><div class="short">The minimum value in pixels which this BoxComponent will set its width to.
  49. Warning: This will override any size manag...</div><div class="long"><p>The minimum value in pixels which this BoxComponent will set its width to.</p>
  50. <p><b>Warning:</b> This will override any size management applied by layout managers.</p></div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#boxMinWidth" ext:member="#boxMinWidth" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-bubbleEvents"></a><b><a href="source/Component.html#cfg-Ext.Component-bubbleEvents">bubbleEvents</a></b> : Array<div class="mdesc"><div class="short">An array of events that, when fired, should be bubbled to any parent container.
  51. See Ext.util.Observable.enableBubble....</div><div class="long"><p>An array of events that, when fired, should be bubbled to any parent container.
  52. See <a href="output/Ext.util.Observable.html#Ext.util.Observable-enableBubble" ext:member="enableBubble" ext:cls="Ext.util.Observable">Ext.util.Observable.enableBubble</a>.
  53. Defaults to <tt>[]</tt>.</div></div></td><td class="msource"><a href="output/Ext.Component.html#bubbleEvents" ext:member="#bubbleEvents" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-clearCls"></a><b><a href="source/Component.html#cfg-Ext.Component-clearCls">clearCls</a></b> : String<div class="mdesc"><div class="short">The CSS class used to to apply to the special clearing div rendered
  54. directly after each form field wrapper to provide...</div><div class="long"><p>The CSS class used to to apply to the special clearing div rendered
  55. directly after each form field wrapper to provide field clearing (defaults to
  56. <tt>'x-form-clear-left'</tt>).</p>
  57. <br><p><b>Note</b>: this config is only used when this Component is rendered by a Container
  58. which has been configured to use the <b><a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">FormLayout</a></b> layout
  59. manager (e.g. <a href="output/Ext.form.FormPanel.html" ext:cls="Ext.form.FormPanel">Ext.form.FormPanel</a> or specifying <tt>layout:'form'</tt>) and either a
  60. <tt><a href="output/Ext.Component.html#Ext.Component-fieldLabel" ext:member="fieldLabel" ext:cls="Ext.Component">fieldLabel</a></tt> is specified or <tt>isFormField=true</tt> is specified.</p><br>
  61. <p>See <a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">Ext.layout.FormLayout</a>.<a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-fieldTpl" ext:member="fieldTpl" ext:cls="Ext.layout.FormLayout">fieldTpl</a> also.</p></div></div></td><td class="msource"><a href="output/Ext.Component.html#clearCls" ext:member="#clearCls" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-contentEl"></a><b><a href="source/Component.html#cfg-Ext.Component-contentEl">contentEl</a></b> : String<div class="mdesc"><div class="short">Optional. Specify an existing HTML element, or the id of an existing HTML element to use as the content
  62. for this comp...</div><div class="long"><p>Optional. Specify an existing HTML element, or the <code>id</code> of an existing HTML element to use as the content
  63. for this component.</p>
  64. <ul>
  65. <li><b>Description</b> :
  66. <div class="sub-desc">This config option is used to take an existing HTML element and place it in the layout element
  67. of a new component (it simply moves the specified DOM element <i>after the Component is rendered</i> to use as the content.</div></li>
  68. <li><b>Notes</b> :
  69. <div class="sub-desc">The specified HTML element is appended to the layout element of the component <i>after any configured
  70. <a href="output/Ext.Component.html#Ext.Component-html" ext:member="html" ext:cls="Ext.Component">HTML</a> has been inserted</i>, and so the document will not contain this element at the time the <a href="output/Ext.Component.html#Ext.Component-render" ext:member="render" ext:cls="Ext.Component">render</a> event is fired.</div>
  71. <div class="sub-desc">The specified HTML element used will not participate in any <code><b><a href="output/Ext.Container.html#Ext.Container-layout" ext:member="layout" ext:cls="Ext.Container">layout</a></b></code>
  72. scheme that the Component may use. It is just HTML. Layouts operate on child <code><b><a href="output/Ext.Container.html#Ext.Container-items" ext:member="items" ext:cls="Ext.Container">items</a></b></code>.</div>
  73. <div class="sub-desc">Add either the <code>x-hidden</code> or the <code>x-hide-display</code> CSS class to
  74. prevent a brief flicker of the content before it is rendered to the panel.</div></li>
  75. </ul></div></div></td><td class="msource"><a href="output/Ext.Component.html#contentEl" ext:member="#contentEl" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.HtmlEditor-createLinkText"></a><b><a href="source/HtmlEditor.html#cfg-Ext.form.HtmlEditor-createLinkText">createLinkText</a></b> : String<div class="mdesc">The default text for the create link prompt</div></td><td class="msource">HtmlEditor</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-ctCls"></a><b><a href="source/Component.html#cfg-Ext.Component-ctCls">ctCls</a></b> : String<div class="mdesc"><div class="short">An optional extra CSS class that will be added to this component's container. This can be useful for
  76. adding customize...</div><div class="long"><p>An optional extra CSS class that will be added to this component's container. This can be useful for
  77. adding customized styles to the container or any of its children using standard CSS rules. See
  78. <a href="output/Ext.layout.ContainerLayout.html" ext:cls="Ext.layout.ContainerLayout">Ext.layout.ContainerLayout</a>.<a href="output/Ext.layout.ContainerLayout.html#Ext.layout.ContainerLayout-extraCls" ext:member="extraCls" ext:cls="Ext.layout.ContainerLayout">extraCls</a> also.</p>
  79. <p><b>Note</b>: <tt>ctCls</tt> defaults to <tt>''</tt> except for the following class
  80. which assigns a value by default:
  81. <div class="mdetail-params"><ul>
  82. <li><a href="output/Ext.layout.Box.html" ext:cls="Ext.layout.Box">Box Layout</a> : <tt>'x-box-layout-ct'</tt></li>
  83. </ul></div>
  84. To configure the above Class with an extra CSS class append to the default. For example,
  85. for BoxLayout (Hbox and Vbox):<pre><code>ctCls: <em>'x-box-layout-ct custom-class'</em></code></pre>
  86. </p></div></div></td><td class="msource"><a href="output/Ext.Component.html#ctCls" ext:member="#ctCls" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-data"></a><b><a href="source/Component.html#cfg-Ext.Component-data">data</a></b> : Mixed<div class="mdesc">The initial set of data to apply to the <code><a href="output/Ext.Component.html#Ext.Component-tpl" ext:member="tpl" ext:cls="Ext.Component">tpl</a></code> to
  87. update the content area of the Component.</div></td><td class="msource"><a href="output/Ext.Component.html#data" ext:member="#data" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.HtmlEditor-defaultLinkValue"></a><b><a href="source/HtmlEditor.html#cfg-Ext.form.HtmlEditor-defaultLinkValue">defaultLinkValue</a></b> : String<div class="mdesc">The default value for the create link prompt (defaults to http:/ /)</div></td><td class="msource">HtmlEditor</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.HtmlEditor-defaultValue"></a><b><a href="source/HtmlEditor.html#cfg-Ext.form.HtmlEditor-defaultValue">defaultValue</a></b> : String<div class="mdesc"><div class="short">A default value to be put into the editor to resolve focus issues (defaults to &amp;#160; (Non-breaking space) in Opera a...</div><div class="long">A default value to be put into the editor to resolve focus issues (defaults to &#160; (Non-breaking space) in Opera and IE6, &#8203; (Zero-width space) in all other browsers).</div></div></td><td class="msource">HtmlEditor</td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.HtmlEditor-enableAlignments"></a><b><a href="source/HtmlEditor.html#cfg-Ext.form.HtmlEditor-enableAlignments">enableAlignments</a></b> : Boolean<div class="mdesc">Enable the left, center, right alignment buttons (defaults to true)</div></td><td class="msource">HtmlEditor</td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.HtmlEditor-enableColors"></a><b><a href="source/HtmlEditor.html#cfg-Ext.form.HtmlEditor-enableColors">enableColors</a></b> : Boolean<div class="mdesc">Enable the fore/highlight color buttons (defaults to true)</div></td><td class="msource">HtmlEditor</td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.HtmlEditor-enableFont"></a><b><a href="source/HtmlEditor.html#cfg-Ext.form.HtmlEditor-enableFont">enableFont</a></b> : Boolean<div class="mdesc">Enable font selection. Not available in Safari. (defaults to true)</div></td><td class="msource">HtmlEditor</td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.HtmlEditor-enableFontSize"></a><b><a href="source/HtmlEditor.html#cfg-Ext.form.HtmlEditor-enableFontSize">enableFontSize</a></b> : Boolean<div class="mdesc">Enable the increase/decrease font size buttons (defaults to true)</div></td><td class="msource">HtmlEditor</td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.HtmlEditor-enableFormat"></a><b><a href="source/HtmlEditor.html#cfg-Ext.form.HtmlEditor-enableFormat">enableFormat</a></b> : Boolean<div class="mdesc">Enable the bold, italic and underline buttons (defaults to true)</div></td><td class="msource">HtmlEditor</td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.HtmlEditor-enableLinks"></a><b><a href="source/HtmlEditor.html#cfg-Ext.form.HtmlEditor-enableLinks">enableLinks</a></b> : Boolean<div class="mdesc">Enable the create link button. Not available in Safari. (defaults to true)</div></td><td class="msource">HtmlEditor</td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.HtmlEditor-enableLists"></a><b><a href="source/HtmlEditor.html#cfg-Ext.form.HtmlEditor-enableLists">enableLists</a></b> : Boolean<div class="mdesc">Enable the bullet and numbered list buttons. Not available in Safari. (defaults to true)</div></td><td class="msource">HtmlEditor</td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.HtmlEditor-enableSourceEdit"></a><b><a href="source/HtmlEditor.html#cfg-Ext.form.HtmlEditor-enableSourceEdit">enableSourceEdit</a></b> : Boolean<div class="mdesc">Enable the switch to source edit button. Not available in Safari. (defaults to true)</div></td><td class="msource">HtmlEditor</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-fieldLabel"></a><b><a href="source/Component.html#cfg-Ext.Component-fieldLabel">fieldLabel</a></b> : String<div class="mdesc"><div class="short">The label text to display next to this Component (defaults to '').
  88. Note: this config is only used when this Component...</div><div class="long"><p>The label text to display next to this Component (defaults to '').</p>
  89. <br><p><b>Note</b>: this config is only used when this Component is rendered by a Container which
  90. has been configured to use the <b><a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">FormLayout</a></b> layout manager (e.g.
  91. <a href="output/Ext.form.FormPanel.html" ext:cls="Ext.form.FormPanel">Ext.form.FormPanel</a> or specifying <tt>layout:'form'</tt>).</p><br>
  92. <p>Also see <tt><a href="output/Ext.Component.html#Ext.Component-hideLabel" ext:member="hideLabel" ext:cls="Ext.Component">hideLabel</a></tt> and
  93. <a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">Ext.layout.FormLayout</a>.<a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-fieldTpl" ext:member="fieldTpl" ext:cls="Ext.layout.FormLayout">fieldTpl</a>.</p>
  94. Example use:<pre><code><b>new</b> Ext.FormPanel({
  95. height: 100,
  96. renderTo: Ext.getBody(),
  97. items: [{
  98. xtype: <em>'textfield'</em>,
  99. fieldLabel: <em>'Name'</em>
  100. }]
  101. });</code></pre></div></div></td><td class="msource"><a href="output/Ext.Component.html#fieldLabel" ext:member="#fieldLabel" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.BoxComponent-flex"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-flex">flex</a></b> : Number<div class="mdesc"><div class="short">Note: this config is only used when this Component is rendered
  102. by a Container which has been configured to use a BoxL...</div><div class="long"><p><b>Note</b>: this config is only used when this Component is rendered
  103. by a Container which has been configured to use a <b><a href="output/Ext.layout.BoxLayout.html" ext:cls="Ext.layout.BoxLayout">BoxLayout</a>.</b>
  104. Each child Component with a <code>flex</code> property will be flexed either vertically (by a VBoxLayout)
  105. or horizontally (by an HBoxLayout) according to the item's <b>relative</b> <code>flex</code> value
  106. compared to the sum of all Components with <code>flex</flex> value specified. Any child items that have
  107. either a <code>flex = 0</code> or <code>flex = undefined</code> will not be 'flexed' (the initial size will not be changed).</div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#flex" ext:member="#flex" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.HtmlEditor-fontFamilies"></a><b><a href="source/HtmlEditor.html#cfg-Ext.form.HtmlEditor-fontFamilies">fontFamilies</a></b> : Array<div class="mdesc">An array of available font families</div></td><td class="msource">HtmlEditor</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.BoxComponent-height"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-height">height</a></b> : Number<div class="mdesc"><div class="short">The height of this component in pixels (defaults to auto).
  108. Note to express this dimension as a percentage or offset s...</div><div class="long">The height of this component in pixels (defaults to auto).
  109. <b>Note</b> to express this dimension as a percentage or offset see <a href="output/Ext.Component.html#Ext.Component-anchor" ext:member="anchor" ext:cls="Ext.Component">Ext.Component.anchor</a>.</div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#height" ext:member="#height" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-hidden"></a><b><a href="source/Component.html#cfg-Ext.Component-hidden">hidden</a></b> : Boolean<div class="mdesc">Render this component hidden (default is false). If <tt>true</tt>, the
  110. <a href="output/Ext.Component.html#Ext.Component-hide" ext:member="hide" ext:cls="Ext.Component">hide</a> method will be called internally.</div></td><td class="msource"><a href="output/Ext.Component.html#hidden" ext:member="#hidden" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-hideLabel"></a><b><a href="source/Component.html#cfg-Ext.Component-hideLabel">hideLabel</a></b> : Boolean<div class="mdesc"><div class="short">true to completely hide the label element
  111. (label and separator). Defaults to false.
  112. By default, even if you do not sp...</div><div class="long"><p><tt>true</tt> to completely hide the label element
  113. (<a href="output/Ext.Component.html#Ext.Component-fieldLabel" ext:member="fieldLabel" ext:cls="Ext.Component">label</a> and <a href="output/Ext.Component.html#Ext.Component-labelSeparator" ext:member="labelSeparator" ext:cls="Ext.Component">separator</a>). Defaults to <tt>false</tt>.
  114. By default, even if you do not specify a <tt><a href="output/Ext.Component.html#Ext.Component-fieldLabel" ext:member="fieldLabel" ext:cls="Ext.Component">fieldLabel</a></tt> the space will still be
  115. reserved so that the field will line up with other fields that do have labels.
  116. Setting this to <tt>true</tt> will cause the field to not reserve that space.</p>
  117. <br><p><b>Note</b>: see the note for <tt><a href="output/Ext.Component.html#Ext.Component-clearCls" ext:member="clearCls" ext:cls="Ext.Component">clearCls</a></tt>.</p><br>
  118. Example use:<pre><code><b>new</b> Ext.FormPanel({
  119. height: 100,
  120. renderTo: Ext.getBody(),
  121. items: [{
  122. xtype: <em>'textfield'</em>
  123. hideLabel: true
  124. }]
  125. });</code></pre></div></div></td><td class="msource"><a href="output/Ext.Component.html#hideLabel" ext:member="#hideLabel" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-hideMode"></a><b><a href="source/Component.html#cfg-Ext.Component-hideMode">hideMode</a></b> : String<div class="mdesc"><div class="short">How this component should be hidden. Supported values are 'visibility'
  126. (css visibility), 'offsets' (negative offset p...</div><div class="long"><p>How this component should be hidden. Supported values are <tt>'visibility'</tt>
  127. (css visibility), <tt>'offsets'</tt> (negative offset position) and <tt>'display'</tt>
  128. (css display).</p>
  129. <br><p><b>Note</b>: the default of <tt>'display'</tt> is generally preferred
  130. since items are automatically laid out when they are first shown (no sizing
  131. is done while hidden).</p></div></div></td><td class="msource"><a href="output/Ext.Component.html#hideMode" ext:member="#hideMode" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-hideParent"></a><b><a href="source/Component.html#cfg-Ext.Component-hideParent">hideParent</a></b> : Boolean<div class="mdesc"><div class="short">True to hide and show the component's container when hide/show is called on the component, false to hide
  132. and show the...</div><div class="long">True to hide and show the component's container when hide/show is called on the component, false to hide
  133. and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide
  134. button on a window by setting hide:true on the button when adding it to its parent container.</div></div></td><td class="msource"><a href="output/Ext.Component.html#hideParent" ext:member="#hideParent" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-html"></a><b><a href="source/Component.html#cfg-Ext.Component-html">html</a></b> : String/Object<div class="mdesc"><div class="short">An HTML fragment, or a DomHelper specification to use as the layout element
  135. content (defaults to ''). The HTML conten...</div><div class="long">An HTML fragment, or a <a href="output/Ext.DomHelper.html" ext:cls="Ext.DomHelper">DomHelper</a> specification to use as the layout element
  136. content (defaults to ''). The HTML content is added after the component is rendered,
  137. so the document will not contain this HTML at the time the <a href="output/Ext.Component.html#Ext.Component-render" ext:member="render" ext:cls="Ext.Component">render</a> event is fired.
  138. This content is inserted into the body <i>before</i> any configured <a href="output/Ext.Component.html#Ext.Component-contentEl" ext:member="contentEl" ext:cls="Ext.Component">contentEl</a> is appended.</div></div></td><td class="msource"><a href="output/Ext.Component.html#html" ext:member="#html" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-id"></a><b><a href="source/Component.html#cfg-Ext.Component-id">id</a></b> : String<div class="mdesc"><div class="short">The unique id of this component (defaults to an auto-assigned id).
  139. You should assign an id if you need to be able to ...</div><div class="long"><p>The <b>unique</b> id of this component (defaults to an <a href="output/Ext.Component.html#Ext.Component-getId" ext:member="getId" ext:cls="Ext.Component">auto-assigned id</a>).
  140. You should assign an id if you need to be able to access the component later and you do
  141. not have an object reference available (e.g., using <a href="output/Ext.html" ext:cls="Ext">Ext</a>.<a href="output/Ext.html#Ext-getCmp" ext:member="getCmp" ext:cls="Ext">getCmp</a>).</p>
  142. <p>Note that this id will also be used as the element id for the containing HTML element
  143. that is rendered to the page for this component. This allows you to write id-based CSS
  144. rules to style the specific instance of this component uniquely, and also to select
  145. sub-elements using this component's id as the parent.</p>
  146. <p><b>Note</b>: to avoid complications imposed by a unique <tt>id</tt> also see
  147. <code><a href="output/Ext.Component.html#Ext.Component-itemId" ext:member="itemId" ext:cls="Ext.Component">itemId</a></code> and <code><a href="output/Ext.Component.html#Ext.Component-ref" ext:member="ref" ext:cls="Ext.Component">ref</a></code>.</p>
  148. <p><b>Note</b>: to access the container of an item see <code><a href="output/Ext.Component.html#Ext.Component-ownerCt" ext:member="ownerCt" ext:cls="Ext.Component">ownerCt</a></code>.</p></div></div></td><td class="msource"><a href="output/Ext.Component.html#id" ext:member="#id" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-itemCls"></a><b><a href="source/Component.html#cfg-Ext.Component-itemCls">itemCls</a></b> : String<div class="mdesc"><div class="short">Note: this config is only used when this Component is rendered by a Container which
  149. has been configured to use the Fo...</div><div class="long"><p><b>Note</b>: this config is only used when this Component is rendered by a Container which
  150. has been configured to use the <b><a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">FormLayout</a></b> layout manager (e.g.
  151. <a href="output/Ext.form.FormPanel.html" ext:cls="Ext.form.FormPanel">Ext.form.FormPanel</a> or specifying <tt>layout:'form'</tt>).</p><br>
  152. <p>An additional CSS class to apply to the div wrapping the form item
  153. element of this field. If supplied, <tt>itemCls</tt> at the <b>field</b> level will override
  154. the default <tt>itemCls</tt> supplied at the <b>container</b> level. The value specified for
  155. <tt>itemCls</tt> will be added to the default class (<tt>'x-form-item'</tt>).</p>
  156. <p>Since it is applied to the item wrapper (see
  157. <a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">Ext.layout.FormLayout</a>.<a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-fieldTpl" ext:member="fieldTpl" ext:cls="Ext.layout.FormLayout">fieldTpl</a>), it allows
  158. you to write standard CSS rules that can apply to the field, the label (if specified), or
  159. any other element within the markup for the field.</p>
  160. <br><p><b>Note</b>: see the note for <tt><a href="output/Ext.Component.html#Ext.Component-fieldLabel" ext:member="fieldLabel" ext:cls="Ext.Component">fieldLabel</a></tt>.</p><br>
  161. Example use:<pre><code><i>// Apply a style to the field&#39;s <b>label</b>:</i>
  162. &lt;style>
  163. .required .x-form-item-<b>label</b> {font-weight:bold;color:red;}
  164. &lt;/style>
  165. <b>new</b> Ext.FormPanel({
  166. height: 100,
  167. renderTo: Ext.getBody(),
  168. items: [{
  169. xtype: <em>'textfield'</em>,
  170. fieldLabel: <em>'Name'</em>,
  171. itemCls: <em>'required'</em> <i>//this <b>label</b> will be styled</i>
  172. },{
  173. xtype: <em>'textfield'</em>,
  174. fieldLabel: <em>'Favorite Color'</em>
  175. }]
  176. });</code></pre></div></div></td><td class="msource"><a href="output/Ext.Component.html#itemCls" ext:member="#itemCls" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-itemId"></a><b><a href="source/Component.html#cfg-Ext.Component-itemId">itemId</a></b> : String<div class="mdesc"><div class="short">An itemId can be used as an alternative way to get a reference to a component
  177. when no object reference is available. ...</div><div class="long"><p>An <tt>itemId</tt> can be used as an alternative way to get a reference to a component
  178. when no object reference is available. Instead of using an <code><a href="output/Ext.Component.html#Ext.Component-id" ext:member="id" ext:cls="Ext.Component">id</a></code> with
  179. <a href="output/Ext.html" ext:cls="Ext">Ext</a>.<a href="output/Ext.html#Ext-getCmp" ext:member="getCmp" ext:cls="Ext">getCmp</a>, use <code>itemId</code> with
  180. <a href="output/Ext.Container.html" ext:cls="Ext.Container">Ext.Container</a>.<a href="output/Ext.Container.html#Ext.Container-getComponent" ext:member="getComponent" ext:cls="Ext.Container">getComponent</a> which will retrieve
  181. <code>itemId</code>'s or <tt><a href="output/Ext.Component.html#Ext.Component-id" ext:member="id" ext:cls="Ext.Component">id</a></tt>'s. Since <code>itemId</code>'s are an index to the
  182. container's internal MixedCollection, the <code>itemId</code> is scoped locally to the container --
  183. avoiding potential conflicts with <a href="output/Ext.ComponentMgr.html" ext:cls="Ext.ComponentMgr">Ext.ComponentMgr</a> which requires a <b>unique</b>
  184. <code><a href="output/Ext.Component.html#Ext.Component-id" ext:member="id" ext:cls="Ext.Component">id</a></code>.</p>
  185. <pre><code><b>var</b> c = <b>new</b> Ext.Panel({ <i>//</i>
  186. <a href="output/Ext.BoxComponent.html#Ext.BoxComponent-height" ext:member="height" ext:cls="Ext.BoxComponent">height</a>: 300,
  187. <a href="output/Ext.Component.html#Ext.Component-renderTo" ext:member="renderTo" ext:cls="Ext.Component">renderTo</a>: document.body,
  188. <a href="output/Ext.Container.html#Ext.Container-layout" ext:member="layout" ext:cls="Ext.Container">layout</a>: <em>'auto'</em>,
  189. <a href="output/Ext.Container.html#Ext.Container-items" ext:member="items" ext:cls="Ext.Container">items</a>: [
  190. {
  191. itemId: <em>'p1'</em>,
  192. <a href="output/Ext.Panel.html#Ext.Panel-title" ext:member="title" ext:cls="Ext.Panel">title</a>: <em>'Panel 1'</em>,
  193. <a href="output/Ext.BoxComponent.html#Ext.BoxComponent-height" ext:member="height" ext:cls="Ext.BoxComponent">height</a>: 150
  194. },
  195. {
  196. itemId: <em>'p2'</em>,
  197. <a href="output/Ext.Panel.html#Ext.Panel-title" ext:member="title" ext:cls="Ext.Panel">title</a>: <em>'Panel 2'</em>,
  198. <a href="output/Ext.BoxComponent.html#Ext.BoxComponent-height" ext:member="height" ext:cls="Ext.BoxComponent">height</a>: 150
  199. }
  200. ]
  201. })
  202. p1 = c.<a href="output/Ext.Container.html#Ext.Container-getComponent" ext:member="getComponent" ext:cls="Ext.Container">getComponent</a>(<em>'p1'</em>); <i>// not the same as <a href="output/Ext.html#Ext-getCmp" ext:member="getCmp" ext:cls="Ext">Ext.getCmp()</a></i>
  203. p2 = p1.<a href="output/Ext.Component.html#Ext.Component-ownerCt" ext:member="ownerCt" ext:cls="Ext.Component">ownerCt</a>.<a href="output/Ext.Container.html#Ext.Container-getComponent" ext:member="getComponent" ext:cls="Ext.Container">getComponent</a>(<em>'p2'</em>); <i>// reference via a sibling</i></code></pre>
  204. <p>Also see <tt><a href="output/Ext.Component.html#Ext.Component-id" ext:member="id" ext:cls="Ext.Component">id</a></tt> and <code><a href="output/Ext.Component.html#Ext.Component-ref" ext:member="ref" ext:cls="Ext.Component">ref</a></code>.</p>
  205. <p><b>Note</b>: to access the container of an item see <tt><a href="output/Ext.Component.html#Ext.Component-ownerCt" ext:member="ownerCt" ext:cls="Ext.Component">ownerCt</a></tt>.</p></div></div></td><td class="msource"><a href="output/Ext.Component.html#itemId" ext:member="#itemId" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-labelSeparator"></a><b><a href="source/Component.html#cfg-Ext.Component-labelSeparator">labelSeparator</a></b> : String<div class="mdesc"><div class="short">The separator to display after the text of each
  206. fieldLabel. This property may be configured at various levels.
  207. The o...</div><div class="long"><p>The separator to display after the text of each
  208. <tt><a href="output/Ext.Component.html#Ext.Component-fieldLabel" ext:member="fieldLabel" ext:cls="Ext.Component">fieldLabel</a></tt>. This property may be configured at various levels.
  209. The order of precedence is:
  210. <div class="mdetail-params"><ul>
  211. <li>field / component level</li>
  212. <li>container level</li>
  213. <li><a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-labelSeparator" ext:member="labelSeparator" ext:cls="Ext.layout.FormLayout">layout level</a> (defaults to colon <tt>':'</tt>)</li>
  214. </ul></div>
  215. To display no separator for this field's label specify empty string ''.</p>
  216. <br><p><b>Note</b>: see the note for <tt><a href="output/Ext.Component.html#Ext.Component-clearCls" ext:member="clearCls" ext:cls="Ext.Component">clearCls</a></tt>.</p><br>
  217. <p>Also see <tt><a href="output/Ext.Component.html#Ext.Component-hideLabel" ext:member="hideLabel" ext:cls="Ext.Component">hideLabel</a></tt> and
  218. <a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">Ext.layout.FormLayout</a>.<a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-fieldTpl" ext:member="fieldTpl" ext:cls="Ext.layout.FormLayout">fieldTpl</a>.</p>
  219. Example use:<pre><code><b>new</b> Ext.FormPanel({
  220. height: 100,
  221. renderTo: Ext.getBody(),
  222. layoutConfig: {
  223. labelSeparator: <em>'~'</em> <i>// layout config has lowest priority (defaults to <em>':'</em>)</i>
  224. },
  225. <a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-labelSeparator" ext:member="labelSeparator" ext:cls="Ext.layout.FormLayout">labelSeparator</a>: <em>'>>'</em>, <i>// config at container level</i>
  226. items: [{
  227. xtype: <em>'textfield'</em>,
  228. fieldLabel: <em>'Field 1'</em>,
  229. labelSeparator: <em>'...'</em> <i>// field/component level config supersedes others</i>
  230. },{
  231. xtype: <em>'textfield'</em>,
  232. fieldLabel: <em>'Field 2'</em> <i>// labelSeparator will be <em>'='</em></i>
  233. }]
  234. });</code></pre></div></div></td><td class="msource"><a href="output/Ext.Component.html#labelSeparator" ext:member="#labelSeparator" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-labelStyle"></a><b><a href="source/Component.html#cfg-Ext.Component-labelStyle">labelStyle</a></b> : String<div class="mdesc"><div class="short">A CSS style specification string to apply directly to this field's
  235. label. Defaults to the container's labelStyle val...</div><div class="long"><p>A CSS style specification string to apply directly to this field's
  236. label. Defaults to the container's labelStyle value if set (e.g.,
  237. <tt><a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-labelStyle" ext:member="labelStyle" ext:cls="Ext.layout.FormLayout">Ext.layout.FormLayout.labelStyle</a></tt> , or '').</p>
  238. <br><p><b>Note</b>: see the note for <code><a href="output/Ext.Component.html#Ext.Component-clearCls" ext:member="clearCls" ext:cls="Ext.Component">clearCls</a></code>.</p><br>
  239. <p>Also see <code><a href="output/Ext.Component.html#Ext.Component-hideLabel" ext:member="hideLabel" ext:cls="Ext.Component">hideLabel</a></code> and
  240. <code><a href="output/Ext.layout.FormLayout.html" ext:cls="Ext.layout.FormLayout">Ext.layout.FormLayout</a>.<a href="output/Ext.layout.FormLayout.html#Ext.layout.FormLayout-fieldTpl" ext:member="fieldTpl" ext:cls="Ext.layout.FormLayout">fieldTpl</a>.</code></p>
  241. Example use:<pre><code><b>new</b> Ext.FormPanel({
  242. height: 100,
  243. renderTo: Ext.getBody(),
  244. items: [{
  245. xtype: <em>'textfield'</em>,
  246. fieldLabel: <em>'Name'</em>,
  247. labelStyle: <em>'font-weight:bold;'</em>
  248. }]
  249. });</code></pre></div></div></td><td class="msource"><a href="output/Ext.Component.html#labelStyle" ext:member="#labelStyle" ext:cls="Ext.Component">Component</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-listeners"></a><b><a href="source/Observable.html#cfg-Ext.util.Observable-listeners">listeners</a></b> : Object<div class="mdesc"><div class="short">A config object containing one or more event handlers to be added to this
  250. object during initialization. This should ...</div><div class="long"><p>A config object containing one or more event handlers to be added to this
  251. object during initialization. This should be a valid listeners config object as specified in the
  252. <a href="output/Ext.util.Observable.html#Ext.util.Observable-addListener" ext:member="addListener" ext:cls="Ext.util.Observable">addListener</a> example for attaching multiple handlers at once.</p>
  253. <br><p><b><u>DOM events from ExtJs <a href="output/Ext.Component.html" ext:cls="Ext.Component">Components</a></u></b></p>
  254. <br><p>While <i>some</i> ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
  255. is usually only done when extra value can be added. For example the <a href="output/Ext.DataView.html" ext:cls="Ext.DataView">DataView</a>'s
  256. <b><code><a href="output/Ext.DataView.html#Ext.DataView-click" ext:member="click" ext:cls="Ext.DataView">click</a></code></b> event passing the node clicked on. To access DOM
  257. events directly from a Component's HTMLElement, listeners must be added to the <i><a href="output/Ext.Component.html#Ext.Component-getEl" ext:member="getEl" ext:cls="Ext.Component">Element</a></i> after the Component
  258. has been rendered. A plugin can simplify this step:<pre><code><i>// Plugin is configured <b>with</b> a listeners config object.</i>
  259. <i>// The Component is appended to the argument list of all handler functions.</i>
  260. Ext.DomObserver = Ext.extend(Object, {
  261. constructor: <b>function</b>(config) {
  262. this.listeners = config.listeners ? config.listeners : config;
  263. },
  264. <i>// Component passes itself into plugin&#39;s init method</i>
  265. init: <b>function</b>(c) {
  266. <b>var</b> p, l = this.listeners;
  267. <b>for</b> (p <b>in</b> l) {
  268. <b>if</b> (Ext.isFunction(l[p])) {
  269. l[p] = this.createHandler(l[p], c);
  270. } <b>else</b> {
  271. l[p].fn = this.createHandler(l[p].fn, c);
  272. }
  273. }
  274. <i>// Add the listeners to the Element immediately following the render call</i>
  275. c.render = c.render.<a href="output/Function.html#Function-createSequence" ext:member="createSequence" ext:cls="Function">createSequence</a>(<b>function</b>() {
  276. <b>var</b> e = c.getEl();
  277. <b>if</b> (e) {
  278. e.on(l);
  279. }
  280. });
  281. },
  282. createHandler: <b>function</b>(fn, c) {
  283. <b>return</b> <b>function</b>(e) {
  284. fn.call(this, e, c);
  285. };
  286. }
  287. });
  288. <b>var</b> combo = <b>new</b> Ext.form.ComboBox({
  289. <i>// Collapse combo when its element is clicked on</i>
  290. plugins: [ <b>new</b> Ext.DomObserver({
  291. click: <b>function</b>(evt, comp) {
  292. comp.collapse();
  293. }
  294. })],
  295. store: myStore,
  296. typeAhead: true,
  297. mode: <em>'local'</em>,
  298. triggerAction: <em>'all'</em>
  299. });</code></pre></p></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#listeners" ext:member="#listeners" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.BoxComponent-margins"></a><b><a href="source/BoxComponent.html#cfg-Ext.BoxComponent-margins">margins</a></b> : Object<div class="mdesc"><div class="short">Note: this config is only used when this BoxComponent is rendered
  300. by a Container which has been configured to use the...</div><div class="long"><p><b>Note</b>: this config is only used when this BoxComponent is rendered
  301. by a Container which has been configured to use the <b><a href="output/Ext.layout.BorderLayout.html" ext:cls="Ext.layout.BorderLayout">BorderLayout</a></b>
  302. or one of the two <b><a href="output/Ext.layout.BoxLayout.html" ext:cls="Ext.layout.BoxLayout">BoxLayout</a> subclasses.</b></p>
  303. <p>An object containing margins to apply to this BoxComponent in the
  304. format:</p><pre><code>{
  305. top: (top margin),
  306. right: (right margin),
  307. bottom: (bottom margin),
  308. left: (left margin)
  309. }</code></pre>
  310. <p>May also be a string containing space-separated, numeric margin values. The order of the
  311. sides associated with each value matches the way CSS processes margin values:</p>
  312. <p><div class="mdetail-params"><ul>
  313. <li>If there is only one value, it applies to all sides.</li>
  314. <li>If there are two values, the top and bottom borders are set to the first value and the
  315. right and left are set to the second.</li>
  316. <li>If there are three values, the top is set to the first value, the left and right are set
  317. to the second, and the bottom is set to the third.</li>
  318. <li>If there are four values, they apply to the top, right, bottom, and left, respectively.</li>
  319. </ul></div></p>
  320. <p>Defaults to:</p><pre><code>{top:0, right:0, bottom:0, left:0}</code></pre></div></div></td><td class="msource"><a href="output/Ext.BoxComponent.html#margins" ext:member="#margins" ext:cls="Ext.BoxComponent">BoxComponent</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.Field-name"></a><b><a href="source/Field.html#cfg-Ext.form.Field-name">name</a></b> : String<div class="mdesc"><div class="short">The field's HTML name attribute (defaults to '').
  321. Note: this property must be set if this field is to be automaticall...</div><div class="long">The field's HTML name attribute (defaults to '').
  322. <b>Note</b>: this property must be set if this field is to be automatically included with
  323. <a href="output/Ext.form.BasicForm.html#Ext.form.BasicForm-submit" ext:member="submit" ext:cls="Ext.form.BasicForm">form submit()</a>.</div></div></td><td class="msource"><a href="output/Ext.form.Field.html#name" ext:member="#name" ext:cls="Ext.form.Field">Field</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Component-overCls"></a><b><a href="source/Component.html#cfg-Ext.Compo…