| anchor : StringNote: this config is only used when this Component is rendered
+ Provides a lightweight HTML Editor component. Some toolbar features are not supported by Safari and will be
+automatically hidden when needed. These are noted in the config options where appropriate.
+ The editor's toolbar buttons have tooltips defined in the buttonTips property, but they are not
+enabled by default unless the global Ext.QuickTips singleton is initialized.
+ Note: The focus/blur and validation marking functionality inherited from Ext.form.Field is NOT
+supported by this editor.
+ An Editor is a sensitive component that can't be used in all spots standard fields can be used. Putting an Editor within
+any element that has display set to 'none' can cause problems in Safari and Firefox due to their default iframe reloading bugs.
+ Example usage:
+ // Simple example rendered with default options:
+Ext.QuickTips.init(); // enable tooltips
+new Ext.form.HtmlEditor({
+ renderTo: Ext.getBody(),
+ width: 800,
+ height: 300
+});
+
+// Passed via xtype into a container and with custom options:
+Ext.QuickTips.init(); // enable tooltips
+new Ext.Panel({
+ title: 'HTML Editor',
+ renderTo: Ext.getBody(),
+ width: 600,
+ height: 300,
+ frame: true,
+ layout: 'fit',
+ items: {
+ xtype: 'htmleditor',
+ enableColors: false,
+ enableAlignments: false
+ }
+});
Config Options|
| anchor : StringNote: this config is only used when this Component is rendered
by a Container which has been configured to use an Anc... Note: this config is only used when this Component is rendered
-by a Container which has been configured to use an AnchorLayout
+by a Container which has been configured to use an AnchorLayout (or subclass thereof).
based layout manager, for example:
- See Ext.layout.AnchorLayout.anchor also. | Component | | autoShow : Boolean | BoxComponent | | autoEl : MixedA tag name or DomHelper spec used to create the Element which will
+encapsulate this Component.
+You do not normally ne... A tag name or DomHelper spec used to create the Element which will
+encapsulate this Component.
+ You do not normally need to specify this. For the base classes Ext.Component, Ext.BoxComponent,
+and Ext.Container, this defaults to 'div'. The more complex Ext classes use a more complex
+DOM structure created by their own onRender methods.
+ This is intended to allow the developer to create application-specific utility Components encapsulated by
+different DOM elements. Example usage: {
+ xtype: 'box',
+ autoEl: {
+ tag: 'img',
+ src: 'http://www.example.com/example.jpg'
+ }
+}, {
+ xtype: 'box',
+ autoEl: {
+ tag: 'blockquote',
+ html: 'autoEl is cool!'
+ }
+}, {
+ xtype: 'container',
+ autoEl: 'ul',
+ cls: 'ux-unordered-list',
+ items: {
+ xtype: 'box',
+ autoEl: 'li',
+ html: 'First list item'
+ }
+}
| Component | | autoScroll : Booleantrue to use overflow:'auto' on the components layout element and show scroll bars automatically when
+necessary, false... true to use overflow:'auto' on the components layout element and show scroll bars automatically when
+necessary, false to clip any overflowing content (defaults to false ).
| BoxComponent | | autoShow : BooleanTrue if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
them on render... True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
-them on render (defaults to false). | Component | | clearCls : StringThe CSS class used to to apply to the special clearing div rendered
+them on render (defaults to false). | Component | | boxMaxHeight : NumberThe maximum value in pixels which this BoxComponent will set its height to.
+Warning: This will override any size mana... The maximum value in pixels which this BoxComponent will set its height to.
+ Warning: This will override any size management applied by layout managers. | BoxComponent | | boxMaxWidth : NumberThe maximum value in pixels which this BoxComponent will set its width to.
+Warning: This will override any size manag... The maximum value in pixels which this BoxComponent will set its width to.
+ Warning: This will override any size management applied by layout managers. | BoxComponent | | boxMinHeight : NumberThe minimum value in pixels which this BoxComponent will set its height to.
+Warning: This will override any size mana... The minimum value in pixels which this BoxComponent will set its height to.
+ Warning: This will override any size management applied by layout managers. | BoxComponent | | boxMinWidth : NumberThe minimum value in pixels which this BoxComponent will set its width to.
+Warning: This will override any size manag... The minimum value in pixels which this BoxComponent will set its width to.
+ Warning: This will override any size management applied by layout managers. | BoxComponent | | bubbleEvents : ArrayAn array of events that, when fired, should be bubbled to any parent container.
+See Ext.util.Observable.enableBubble.... | Component | | clearCls : StringThe CSS class used to to apply to the special clearing div rendered
directly after each form field wrapper to provide... The CSS class used to to apply to the special clearing div rendered
directly after each form field wrapper to provide field clearing (defaults to
'x-form-clear-left').
@@ -46,7 +92,21 @@ directly after each form field wrapper to provide field clearing (defaults to
which has been configured to use the FormLayout layout
manager (e.g. Ext.form.FormPanel or specifying layout:'form') and either a
fieldLabel is specified or isFormField=true is specified.
- See Ext.layout.FormLayout.fieldTpl also. | Component | | createLinkText : String The default text for the create link prompt | HtmlEditor | | ctCls : String | Component | | contentEl : StringOptional. Specify an existing HTML element, or the id of an existing HTML element to use as the content
+for this comp... Optional. Specify an existing HTML element, or the id of an existing HTML element to use as the content
+for this component.
+
+- Description :
+
This config option is used to take an existing HTML element and place it in the layout element
+of a new component (it simply moves the specified DOM element after the Component is rendered to use as the content.
+- Notes :
+
The specified HTML element is appended to the layout element of the component after any configured
+HTML has been inserted, and so the document will not contain this element at the time the render event is fired.
+The specified HTML element used will not participate in any layout
+scheme that the Component may use. It is just HTML. Layouts operate on child items .
+Add either the x-hidden or the x-hide-display CSS class to
+prevent a brief flicker of the content before it is rendered to the panel.
+ | Component | | createLinkText : String The default text for the create link prompt | HtmlEditor | | ctCls : StringAn optional extra CSS class that will be added to this component's container. This can be useful for
adding customize... An optional extra CSS class that will be added to this component's container. This can be useful for
adding customized styles to the container or any of its children using standard CSS rules. See
Ext.layout.ContainerLayout.extraCls also.
@@ -57,7 +117,8 @@ which assigns a value by default:
To configure the above Class with an extra CSS class append to the default. For example,
for BoxLayout (Hbox and Vbox): ctCls: 'x-box-layout-ct custom-class'
- | Component | | defaultLinkValue : String The default value for the create link prompt (defaults to http:/ /) | HtmlEditor | | defaultValue : StringA default value to be put into the editor to resolve focus issues (defaults to ​ (Zero-width space), (No... A default value to be put into the editor to resolve focus issues (defaults to (Zero-width space), (Non-breaking space) in Opera and IE6). | HtmlEditor | | enableAlignments : Boolean Enable the left, center, right alignment buttons (defaults to true) | HtmlEditor | | enableColors : Boolean Enable the fore/highlight color buttons (defaults to true) | HtmlEditor | | enableFont : Boolean Enable font selection. Not available in Safari. (defaults to true) | HtmlEditor | | enableFontSize : Boolean Enable the increase/decrease font size buttons (defaults to true) | HtmlEditor | | enableFormat : Boolean Enable the bold, italic and underline buttons (defaults to true) | HtmlEditor | | enableLinks : Boolean Enable the create link button. Not available in Safari. (defaults to true) | HtmlEditor | | enableLists : Boolean Enable the bullet and numbered list buttons. Not available in Safari. (defaults to true) | HtmlEditor | | enableSourceEdit : Boolean Enable the switch to source edit button. Not available in Safari. (defaults to true) | HtmlEditor | | fieldLabel : StringThe label text to display next to this Component (defaults to '').
+ | Component | | data : MixedThe initial set of data to apply to the tpl to
+update the content area of the Component. | Component | | defaultLinkValue : String The default value for the create link prompt (defaults to http:/ /) | HtmlEditor | | defaultValue : StringA default value to be put into the editor to resolve focus issues (defaults to   (Non-breaking space) in Opera a... A default value to be put into the editor to resolve focus issues (defaults to (Non-breaking space) in Opera and IE6, (Zero-width space) in all other browsers). | HtmlEditor | | enableAlignments : Boolean Enable the left, center, right alignment buttons (defaults to true) | HtmlEditor | | enableColors : Boolean Enable the fore/highlight color buttons (defaults to true) | HtmlEditor | | enableFont : Boolean Enable font selection. Not available in Safari. (defaults to true) | HtmlEditor | | enableFontSize : Boolean Enable the increase/decrease font size buttons (defaults to true) | HtmlEditor | | enableFormat : Boolean Enable the bold, italic and underline buttons (defaults to true) | HtmlEditor | | enableLinks : Boolean Enable the create link button. Not available in Safari. (defaults to true) | HtmlEditor | | enableLists : Boolean Enable the bullet and numbered list buttons. Not available in Safari. (defaults to true) | HtmlEditor | | enableSourceEdit : Boolean Enable the switch to source edit button. Not available in Safari. (defaults to true) | HtmlEditor | | fieldLabel : StringThe label text to display next to this Component (defaults to '').
Note: this config is only used when this Component... The label text to display next to this Component (defaults to '').
Note: this config is only used when this Component is rendered by a Container which
has been configured to use the FormLayout layout manager (e.g.
@@ -71,7 +132,13 @@ Example use: new Ext.FormPanel({
xtype: 'textfield',
fieldLabel: 'Name'
}]
-});
| Component | | fontFamilies : Array An array of available font families | HtmlEditor | | height : NumberThe height of this component in pixels (defaults to auto).
+}); | Component | | flex : NumberNote: this config is only used when this Component is rendered
+by a Container which has been configured to use a BoxL... Note: this config is only used when this Component is rendered
+by a Container which has been configured to use a BoxLayout.
+Each child Component with a flex property will be flexed either vertically (by a VBoxLayout)
+or horizontally (by an HBoxLayout) according to the item's relative flex value
+compared to the sum of all Components with flex value specified. Any child items that have
+either a flex = 0 or flex = undefined will not be 'flexed' (the initial size will not be changed). | BoxComponent | | fontFamilies : Array An array of available font families | HtmlEditor | | height : NumberThe height of this component in pixels (defaults to auto).
Note to express this dimension as a percentage or offset s... The height of this component in pixels (defaults to auto).
Note to express this dimension as a percentage or offset see Ext.Component.anchor. | BoxComponent | | hidden : BooleanRender this component hidden (default is false). If true, the
hide method will be called internally. | Component | | hideLabel : Booleantrue to completely hide the label element
@@ -98,7 +165,11 @@ since items are automatically laid out when they are first shown (no sizing
is done while hidden). | Component | | hideParent : BooleanTrue to hide and show the component's container when hide/show is called on the component, false to hide
and show the... True to hide and show the component's container when hide/show is called on the component, false to hide
and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide
-button on a window by setting hide:true on the button when adding it to its parent container. | Component | | id : StringThe unique id of this component (defaults to an auto-assigned id).
+button on a window by setting hide:true on the button when adding it to its parent container. | Component | | html : String/ObjectAn HTML fragment, or a DomHelper specification to use as the layout element
+content (defaults to ''). The HTML conten... An HTML fragment, or a DomHelper specification to use as the layout element
+content (defaults to ''). The HTML content is added after the component is rendered,
+so the document will not contain this HTML at the time the render event is fired.
+This content is inserted into the body before any configured contentEl is appended. | Component | | id : StringThe unique id of this component (defaults to an auto-assigned id).
You should assign an id if you need to be able to ... The unique id of this component (defaults to an auto-assigned id).
You should assign an id if you need to be able to access the component later and you do
not have an object reference available (e.g., using Ext.getCmp).
@@ -108,8 +179,11 @@ rules to style the specific instance of this component uniquely, and also to sel
sub-elements using this component's id as the parent.
Note: to avoid complications imposed by a unique id also see
itemId and ref .
- Note: to access the container of an item see ownerCt . | Component | | itemCls : StringAn additional CSS class to apply to the div wrapping the form item
-element of this field. If supplied, itemCls at th... An additional CSS class to apply to the div wrapping the form item
+ Note: to access the container of an item see ownerCt . | Component | | itemCls : StringNote: this config is only used when this Component is rendered by a Container which
+has been configured to use the Fo... Note: this config is only used when this Component is rendered by a Container which
+has been configured to use the FormLayout layout manager (e.g.
+Ext.form.FormPanel or specifying layout:'form').
+ An additional CSS class to apply to the div wrapping the form item
element of this field. If supplied, itemCls at the field level will override
the default itemCls supplied at the container level. The value specified for
itemCls will be added to the default class ('x-form-item').
@@ -118,22 +192,22 @@ the default itemCls supplied at the container level. The value s
you to write standard CSS rules that can apply to the field, the label (if specified), or
any other element within the markup for the field.
Note: see the note for fieldLabel.
-Example use: // Apply a style to the field's label:
+Example use:// Apply a style to the field's label:
<style>
.required .x-form-item-label {font-weight:bold;color:red;}
</style>
new Ext.FormPanel({
- height: 100,
- renderTo: Ext.getBody(),
- items: [{
- xtype: 'textfield',
- fieldLabel: 'Name',
- itemCls: 'required' //this label will be styled
- },{
- xtype: 'textfield',
- fieldLabel: 'Favorite Color'
- }]
+ height: 100,
+ renderTo: Ext.getBody(),
+ items: [{
+ xtype: 'textfield',
+ fieldLabel: 'Name',
+ itemCls: 'required' //this label will be styled
+ },{
+ xtype: 'textfield',
+ fieldLabel: 'Favorite Color'
+ }]
});
| Component | | itemId : StringAn itemId can be used as an alternative way to get a reference to a component
when no object reference is available. ... An itemId can be used as an alternative way to get a reference to a component
when no object reference is available. Instead of using an id with
@@ -283,8 +357,8 @@ right and left are set to the second.
to the second, and the bottom is set to the third.
If there are four values, they apply to the top, right, bottom, and left, respectively.
- Defaults to: {top:0, right:0, bottom:0, left:0}
| BoxComponent | | name : StringThe field's HTML name attribute (defaults to "").
-Note: this property must be set if this field is to be automaticall... The field's HTML name attribute (defaults to "").
+ Defaults to: {top:0, right:0, bottom:0, left:0}
| BoxComponent | | name : StringThe field's HTML name attribute (defaults to '').
+Note: this property must be set if this field is to be automaticall... The field's HTML name attribute (defaults to '').
Note: this property must be set if this field is to be automatically included with
form submit(). | Field | | overCls : StringAn optional extra CSS class that will be added to this component's Element when the mouse moves
over the Element, and... An optional extra CSS class that will be added to this component's Element when the mouse moves
@@ -294,7 +368,8 @@ requirement for a ... An object or array of objects that
requirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component.
When a component is created, if any plugins are available, the component will call the init method on each
plugin, passing a reference to itself. Each plugin can then call methods or respond to events on the
-component as needed to provide its functionality. | Component | | ptype : StringThe registered ptype to create. This config option is not used when passing
+component as needed to provide its functionality. | Component | | preventMark : Boolean | Field | | ptype : StringThe registered ptype to create. This config option is not used when passing
a config object into a constructor. This ... The registered ptype to create. This config option is not used when passing
a config object into a constructor. This config option is used only when
lazy instantiation is being used, and a Plugin is being
@@ -303,9 +378,9 @@ object. The ptype will be looked up at render time up to determine
type of Plugin to create.
If you create your own Plugins, you may register them using
Ext.ComponentMgr.registerPlugin in order to be able to
-take advantage of lazy instantiation and rendering. | Component | | ref : StringA path specification, relative to the Component's ownerCt specifying into which
-ancestor Container to place a named r... A path specification, relative to the Component's ownerCt specifying into which
-ancestor Container to place a named reference to this Component.
+take advantage of lazy instantiation and rendering. | Component | | ref : StringA path specification, relative to the Component's ownerCt
+specifying into which ancestor Container to place a named r... A path specification, relative to the Component's ownerCt
+specifying into which ancestor Container to place a named reference to this Component.
The ancestor axis can be traversed by using '/' characters in the path.
For example, to put a reference to a Toolbar Button into the Panel which owns the Toolbar: var myGrid = new Ext.grid.EditorGridPanel({
title: 'My EditorGridPanel',
@@ -324,9 +399,10 @@ For example, to put a reference to a Toolbar Button into the Panel which owns
}
}
});
- In the code above, if the ref had been 'saveButton' the reference would
-have been placed into the Toolbar. Each '/' in the ref moves up one level from the
-Component's ownerCt. | Component | | region : StringNote: this config is only used when this BoxComponent is rendered
+ In the code above, if the ref had been 'saveButton'
+the reference would have been placed into the Toolbar. Each '/' in the ref
+moves up one level from the Component's ownerCt .
+ Also see the added and removed events. | Component | | region : StringNote: this config is only used when this BoxComponent is rendered
by a Container which has been configured to use the... Note: this config is only used when this BoxComponent is rendered
by a Container which has been configured to use the BorderLayout
layout manager (e.g. specifying layout:'border').
@@ -389,7 +465,21 @@ properties into the object, but a developer may override this to support
more behaviour.
You can perform extra processing on state save and restore by attaching
handlers to the beforestaterestore, staterestore,
-beforestatesave and statesave events. | Component | | value : Mixed A value to initialize this field with (defaults to undefined). | Field | | width : Number | Component | | submitValue : Boolean False to clear the name attribute on the field so that it is not submitted during a form post.
+Defaults to true. | Field | | tabTip : StringNote: this config is only used when this BoxComponent is a child item of a TabPanel.
+A string to be used as innerHTML... Note: this config is only used when this BoxComponent is a child item of a TabPanel.
+A string to be used as innerHTML (html tags are accepted) to show in a tooltip when mousing over
+the associated tab selector element. Ext.QuickTips.init()
+must be called in order for the tips to render. | BoxComponent | | tpl : MixedAn Ext.Template, Ext.XTemplate
+or an array of strings to form an Ext.XTemplate.
+Used in conjunction with the data and... | Component | | tplWriteMode : StringThe Ext.(X)Template method to use when
+updating the content area of the Component. Defaults to 'overwrite'
+(see Ext.X... The Ext.(X)Template method to use when
+updating the content area of the Component. Defaults to 'overwrite'
+(see Ext.XTemplate.overwrite ). | Component | | value : Mixed A value to initialize this field with (defaults to undefined). | Field | | width : NumberThe width of this component in pixels (defaults to auto).
Note to express this dimension as a percentage or offset se... The width of this component in pixels (defaults to auto).
Note to express this dimension as a percentage or offset see Ext.Component.anchor. | BoxComponent | | x : Number The local x (left) coordinate for this component if contained within a positioning container. | BoxComponent | | xtype : StringThe registered xtype to create. This config option is not used when passing
a config object into a constructor. This ... The registered xtype to create. This config option is not used when passing
@@ -402,21 +492,21 @@ The predefined xtypes are listed Ext.ComponentMgr.registerType in order to be able to
-take advantage of lazy instantiation and rendering. | Component | | y : Number The local y (top) coordinate for this component if contained within a positioning container. | BoxComponent |
Public Properties|
| buttonTips : ObjectObject collection of toolbar tooltips for the buttons in the editor. The key
-is the command id associated with that ... Object collection of toolbar tooltips for the buttons in the editor. The key
-is the command id associated with that button and the value is a valid QuickTips object.
-For example:
- {
- bold : {
- title: 'Bold (Ctrl+B)',
- text: 'Make the selected text bold.',
- cls: 'x-html-editor-tip'
- },
- italic : {
- title: 'Italic (Ctrl+I)',
- text: 'Make the selected text italic.',
- cls: 'x-html-editor-tip'
- },
+take advantage of lazy instantiation and rendering.
| Component | | y : Number The local y (top) coordinate for this component if contained within a positioning container. | BoxComponent |
Public Properties|
| buttonTips : ObjectObject collection of toolbar tooltips for the buttons in the editor. The key
+is the command id associated with that b... Object collection of toolbar tooltips for the buttons in the editor. The key
+is the command id associated with that button and the value is a valid QuickTips object.
+For example:
+ {
+ bold : {
+ title: 'Bold (Ctrl+B)',
+ text: 'Make the selected text bold.',
+ cls: 'x-html-editor-tip'
+ },
+ italic : {
+ title: 'Italic (Ctrl+I)',
+ text: 'Make the selected text italic.',
+ cls: 'x-html-editor-tip'
+ },
...
| HtmlEditor | | el : Ext.ElementThe Ext.Element which encapsulates this Component. Read-only.
This will usually be a <DIV> element created by the ... The Ext.Element which encapsulates this Component. Read-only.
This will usually be a <DIV> element created by the class's onRender method, but
@@ -434,18 +524,27 @@ config for a suggestion, or use a render listener directly: new
single: true // Remove the listener after first invocation
}
});
- See also getEl | Component | | hidden : Boolean True if this component is hidden. Read-only. | Component | | initialConfig : Object This Component's initial configuration specification. Read-only. | Component | | originalValue : mixedThe original value of the field as configured in the value configuration, or
+ See also getEl | Component | | hidden : Boolean True if this component is hidden. Read-only. | Component | | initialConfig : Object This Component's initial configuration specification. Read-only. | Component | | label : Ext.ElementThe label Element associated with this Field. Only available after this Field has been rendered by a
+Ext.layout.FormL... The label Element associated with this Field. Only available after this Field has been rendered by a
+Ext.layout.FormLayout layout manager. | Field | | originalValue : mixedThe original value of the field as configured in the value configuration, or
as loaded by the last form load operatio... The original value of the field as configured in the value configuration, or
as loaded by the last form load operation if the form's trackResetOnLoad
-setting is true . | Field | | ownerCt : Ext.ContainerThe component's owner Ext.Container (defaults to undefined, and is set automatically when
-the component is added to a... The component's owner Ext.Container (defaults to undefined, and is set automatically when
-the component is added to a container). Read-only.
- Note: to access items within the container see itemId. | Component | | rendered : Boolean True if this component has been rendered. Read-only. | Component |
Public Methods|
| HtmlEditor( Object config )
- | HtmlEditor | | addClass( string cls )
- :
- Ext.ComponentAdds a CSS class to the component's underlying element. Adds a CSS class to the component's underlying element. | Component | | addEvents( Object object )
- :
- voidUsed to define events on this Observable Used to define events on this Observable | Observable | | addListener( String eventName , Function handler , [Object scope ], [Object options ] )
+setting is true . | Field | | ownerCt : Ext.ContainerThis Component's owner Container (defaults to undefined, and is set automatically when
+this Component is added to a C... This Component's owner Container (defaults to undefined, and is set automatically when
+this Component is added to a Container). Read-only.
+ Note: to access items within the Container see itemId. | Component | | refOwner : Ext.ContainerThe ancestor Container into which the ref reference was inserted if this Component
+is a child of a Container, and has... The ancestor Container into which the ref reference was inserted if this Component
+is a child of a Container, and has been configured with a ref . | Component | | rendered : Boolean True if this component has been rendered. Read-only. | Component | | startValue : mixedThe value that the Field had at the time it was last focused. This is the value that is passed
+to the change event wh... The value that the Field had at the time it was last focused. This is the value that is passed
+to the change event which is fired if the value has been changed when the Field is blurred.
+ This will be undefined until the Field has been visited. Compare originalValue. | Field |
Public Methods|
| HtmlEditor( Object config )
+ | HtmlEditor | | addClass( string cls )
+ :
+ Ext.ComponentAdds a CSS class to the component's underlying element. Adds a CSS class to the component's underlying element. | Component | | addEvents( Object|String o , string Optional. )
+ :
+ voidAdds the specified events to the list of events which this Observable may fire. Adds the specified events to the list of events which this Observable may fire. | Observable | | addListener( String eventName , Function handler , [Object scope ], [Object options ] )
:
voidAppends an event handler to this object. Appends an event handler to this object. Parameters:eventName : StringThe name of the event to listen for. handler : FunctionThe method the event invokes. scope : Object(optional) The scope (this reference) in which the handler function is executed.
If omitted, defaults to the object which fired the event. options : Object(optional) An object containing handler configuration.
@@ -466,8 +565,8 @@ Using the options argument, it is possible to combine different types of listene
A delayed, one-time listener.
myDataView.on('click', this.onClick, this, {
- single: true,
- delay: 100
+single: true,
+delay: 100
});
Attaching multiple handlers in 1 call
@@ -475,31 +574,36 @@ The method also allows for a single argument to be passed which is a config obje
which specify multiple handlers.
myGridPanel.on({
- 'click' : {
- fn: this.onClick,
- scope: this,
- delay: 100
- },
- 'mouseover' : {
- fn: this.onMouseOver,
- scope: this
- },
- 'mouseout' : {
- fn: this.onMouseOut,
- scope: this
- }
+'click' : {
+ fn: this.onClick,
+ scope: this,
+ delay: 100
+},
+'mouseover' : {
+ fn: this.onMouseOver,
+ scope: this
+},
+'mouseout' : {
+ fn: this.onMouseOut,
+ scope: this
+}
});
Or a shorthand syntax:
myGridPanel.on({
- 'click' : this.onClick,
- 'mouseover' : this.onMouseOver,
- 'mouseout' : this.onMouseOut,
- scope: this
-});
Returns: | Observable | | cleanHtml( String html )
- :
- StringProtected method that will not generally be called directly. If you need/want
-custom HTML cleanup, this is the metho... Protected method that will not generally be called directly. If you need/want
+'click' : this.onClick,
+'mouseover' : this.onMouseOver,
+'mouseout' : this.onMouseOut,
+ scope: this
+}); Returns: | Observable | | bubble( Function fn , [Object scope ], [Array args ] )
+ :
+ Ext.ComponentBubbles up the component/container heirarchy, calling the specified function with each component. The scope (this) of... Bubbles up the component/container heirarchy, calling the specified function with each component. The scope ( this) of
+function call will be the scope provided or the current component. The arguments to the function
+will be the args provided or the current component. If the function returns false at any point,
+the bubble is stopped. | Component | | cleanHtml( String html )
+ :
+ StringProtected method that will not generally be called directly. If you need/want
+custom HTML cleanup, this is the method... Protected method that will not generally be called directly. If you need/want
custom HTML cleanup, this is the method you should override. Parameters:html : StringThe HTML to be cleaned Returns: | HtmlEditor | | cloneConfig( Object overrides )
:
Ext.ComponentClone the current component using the original config values passed into this instance by default. Clone the current component using the original config values passed into this instance by default. Parameters:overrides : ObjectA new config containing any properties to override in the cloned version.
@@ -509,36 +613,73 @@ An id property can be passed on this object, otherwise one will be generated to
removing the c... Destroys this component by purging any event listeners, removing the component's element from the DOM,
removing the component from its Ext.Container (if applicable) and unregistering it from
Ext.ComponentMgr. Destruction is generally handled automatically by the framework and this method
-should usually not need to be called directly.
| Component | | enableBubble( Object events )
- :
- voidUsed to enable bubbling of events Used to enable bubbling of events | Observable | | execCmd( String cmd , [String/Boolean value ] )
+should usually not need to be called directly. | Component | | enableBubble( String/Array events )
+ :
+ voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present.... Enables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present. There is no implementation in the Observable base class.
+ This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default
+implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
+access the required target more quickly.
+ Example: Ext.override(Ext.form.Field, {
+ // Add functionality to Field's initComponent to enable the change event to bubble
+ initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
+ this.enableBubble('change');
+ }),
+
+ // We know that we want Field's events to bubble directly to the FormPanel.
+ getBubbleTarget : function() {
+ if (!this.formPanel) {
+ this.formPanel = this.findParentByType('form');
+ }
+ return this.formPanel;
+ }
+});
+
+var myForm = new Ext.formPanel({
+ title: 'User Details',
+ items: [{
+ ...
+ }],
+ listeners: {
+ change: function() {
+ // Title goes red if form has been modified.
+ myForm.header.setStyle('color', 'red');
+ }
+ }
+});
| Observable | | execCmd( String cmd , [String/Boolean value ] )
:
- voidExecutes a Midas editor command directly on the editor document.
-For visual commands, you should use relayCmd instea... Executes a Midas editor command directly on the editor document.
-For visual commands, you should use relayCmd instead.
+ void Executes a Midas editor command directly on the editor document.
+For visual commands, you should use relayCmd instead... Executes a Midas editor command directly on the editor document.
+For visual commands, you should use relayCmd instead.
This should only be called after the editor is initialized. | HtmlEditor | | findParentBy( Function fn )
:
Ext.ContainerFind a container above this component at any level by a custom function. If the passed function returns
true, the con... Find a container above this component at any level by a custom function. If the passed function returns
-true, the container will be returned. | Component | | findParentByType( String/Class xtype )
+true, the container will be returned. | Component | | findParentByType( String/Ext.Component/Class xtype , [Boolean shallow ] )
:
- Ext.ContainerFind a container above this component at any level by xtype or class Find a container above this component at any level by xtype or class | Component | | fireEvent( String eventName , Object... args )
+ Ext.ContainerFind a container above this component at any level by xtype or class Find a container above this component at any level by xtype or class Parameters:xtype : String/Ext.Component/ClassThe xtype to check for this Component. Note that the the component can either be an instance
+or a component class: shallow : Boolean(optional) False to check whether this Component is descended from the xtype (this is
+the default), or true to check whether this Component is directly of the specified xtype. Returns: | Component | | fireEvent( String eventName , Object... args )
:
BooleanFires the specified event with the passed parameters (minus the event name).
An event may be set to bubble up an Obse... | Observable | | focus( [Boolean selectText ], [Boolean/Number delay ] )
:
- Ext.ComponentTry to focus this component. Try to focus this component. Parameters:selectText : Boolean(optional) If applicable, true to also select the text in this component delay : Boolean/Number(optional) Delay the focus this number of milliseconds (true for 10 milliseconds) Returns: | Component | | getBox( [Boolean local ] )
+ Ext.ComponentTry to focus this component. Try to focus this component. Parameters:selectText : Boolean(optional) If applicable, true to also select the text in this component delay : Boolean/Number(optional) Delay the focus this number of milliseconds (true for 10 milliseconds) Returns: | Component | | getActiveError()
+ :
+ StringGets the active error message for this field. Gets the active error message for this field. | Field | | getBox( [Boolean local ] )
:
ObjectGets the current box measurements of the component's underlying element. Gets the current box measurements of the component's underlying element. | BoxComponent | | getBubbleTarget()
:
Ext.ContainerProvides the link for Observable's fireEvent method to bubble up the ownership hierarchy. Provides the link for Observable's fireEvent method to bubble up the ownership hierarchy. | Component | | getDocMarkup()
:
- voidProtected method that will not generally be called directly. It
-is called when the editor initializes the iframe wit... Protected method that will not generally be called directly. It
-is called when the editor initializes the iframe with HTML contents. Override this method if you
-want to change the initialization markup of the iframe (e.g. to add stylesheets). | HtmlEditor | | getEl()
+ voidProtected method that will not generally be called directly. It
+is called when the editor initializes the iframe with... Protected method that will not generally be called directly. It
+is called when the editor initializes the iframe with HTML contents. Override this method if you
+want to change the initialization markup of the iframe (e.g. to add stylesheets).
+Note: IE8-Standards has unwanted scroller behavior, so the default meta tag forces IE7 compatibility | HtmlEditor | | getEl()
:
Ext.ElementReturns the Ext.Element which encapsulates this Component.
This will usually be a <DIV> element created by the cla... Returns the Ext.Element which encapsulates this Component.
@@ -556,7 +697,12 @@ or use a render listener directly: new Ext.Panel({
},
single: true // Remove the listener after first invocation
}
-});
| Component | | getHeight()
+}); | Component | | getErrors()
+ :
+ ArrayRuns this field's validators and returns an array of error messages for any validation failures.
+This is called inter... Runs this field's validators and returns an array of error messages for any validation failures.
+This is called internally during validation and would not usually need to be used manually.
+Each subclass should override or augment the return value to provide their own errors | Field | | getHeight()
:
NumberGets the current height of the component's underlying element. Gets the current height of the component's underlying element. | BoxComponent | | getId()
:
@@ -580,7 +726,7 @@ attribute of the field if available.Paramete
:
MixedReturns the raw data value which may or may not be a valid, defined value. To return a normalized value see getValue... Returns the raw data value which may or may not be a valid, defined value. To return a normalized value see getValue. Parameters:Returns:Mixed value The field value
| Field | | getResizeEl()
:
- voidReturns the outermost Element of this Component which defines the Components overall size.
+ Ext.Element Returns the outermost Element of this Component which defines the Components overall size.
Usually this will return t... Returns the outermost Element of this Component which defines the Components overall size.
Usually this will return the same Element as getEl ,
but in some cases, a Component may have some more wrapping Elements around its main
@@ -588,7 +734,7 @@ active Element.
An example is a ComboBox. It is encased in a wrapping Element which
contains both the <input> Element (which is what would be returned
by its getEl method, and the trigger button Element.
-This Element is returned as the resizeEl . | BoxComponent | | getSize()
+This Element is returned as the resizeEl . | BoxComponent | | getSize()
:
ObjectGets the current size of the component's underlying element. Gets the current size of the component's underlying element. | BoxComponent | | getToolbar()
:
@@ -621,8 +767,8 @@ false to cancel hiding the component. Fires the 'h...Hi
event after hiding the component. Note this method is called internally if
the component is configured to be hidden . | Component | | insertAtCursor( String text )
:
- voidInserts the passed text at the current cursor position. Note: the editor must be initialized and activated
-to insert... Inserts the passed text at the current cursor position. Note: the editor must be initialized and activated
+ void Inserts the passed text at the current cursor position. Note: the editor must be initialized and activated
+to insert ... Inserts the passed text at the current cursor position. Note: the editor must be initialized and activated
to insert text. | HtmlEditor | | isDirty()
:
BooleanReturns true if the value of this Field has been changed from its original value.
@@ -634,9 +780,13 @@ then the original value is updated when the values are loaded by
Ext.form.BasicForm. setValues. | Field | | isValid( Boolean preventMark )
:
- BooleanReturns whether or not the field value is currently valid Returns whether or not the field value is currently valid | Field | | isVisible()
+ BooleanReturns whether or not the field value is currently valid by
+validating the processed value
+of the field. Note: disab... | Field | | isVisible()
:
- BooleanReturns true if this component is visible. Returns true if this component is visible. | Component | | isXType( String xtype , [Boolean shallow ] )
+ BooleanReturns true if this component is visible. Returns true if this component is visible. | Component | | isXType( String/Ext.Component/Class xtype , [Boolean shallow ] )
:
BooleanTests whether or not this Component is of a specific xtype. This can test whether this Component is descended
from th... Tests whether or not this Component is of a specific xtype. This can test whether this Component is descended
@@ -648,24 +798,53 @@ to participate in determination of inherited xtypes.
var t = new Ext.form.TextField();
var isText = t.isXType('textfield'); // true
var isBoxSubclass = t.isXType('box'); // true, descended from BoxComponent
-var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance
Parameters:xtype : StringThe xtype to check for this Component shallow : Boolean(optional) False to check whether this Component is descended from the xtype (this is
-the default), or true to check whether this Component is directly of the specified xtype. Returns: | Component | | nextSibling()
+var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance | Component | | mon( Observable|Element item , Object|String ename , Function fn , Object scope , Object opt )
+ :
+ voidAdds listeners to any Observable object (or Elements) which are automatically removed when this Component
+is destroye... Adds listeners to any Observable object (or Elements) which are automatically removed when this Component
+is destroyed. Usage:
+myGridPanel.mon(myGridPanel.getSelectionModel(), 'selectionchange', handleSelectionChange, null, {buffer: 50});
+
+ or:
+myGridPanel.mon(myGridPanel.getSelectionModel(), {
+ selectionchange: handleSelectionChange,
+ buffer: 50
+});
+
Parameters:item : Observable|ElementThe item to which to add a listener/listeners. ename : Object|StringThe event name, or an object containing event name properties. fn : FunctionOptional. If the ename parameter was an event name, this
+is the handler function. scope : ObjectOptional. If the ename parameter was an event name, this
+is the scope (this reference) in which the handler function is executed. opt : ObjectOptional. If the ename parameter was an event name, this
+is the addListener options. Returns: | Component | | mun( Observable|Element item , Object|String ename , Function fn , Object scope )
+ :
+ voidRemoves listeners that were added by the mon method. Removes listeners that were added by the mon method. Parameters:item : Observable|ElementThe item from which to remove a listener/listeners. ename : Object|StringThe event name, or an object containing event name properties. fn : FunctionOptional. If the ename parameter was an event name, this
+is the handler function. scope : ObjectOptional. If the ename parameter was an event name, this
+is the scope (this reference) in which the handler function is executed. Returns: | Component | | nextSibling()
:
Ext.ComponentReturns the next component in the owning container Returns the next component in the owning container | Component | | on( String eventName , Function handler , [Object scope ], [Object options ] )
:
voidAppends an event handler to this object (shorthand for addListener.) Appends an event handler to this object (shorthand for addListener.) Parameters:eventName : StringThe type of event to listen for handler : FunctionThe method the event invokes scope : Object(optional) The scope (this reference) in which the handler function is executed.
If omitted, defaults to the object which fired the event. options : Object(optional) An object containing handler configuration. Returns: | Observable | | previousSibling()
:
- Ext.ComponentReturns the previous component in the owning container Returns the previous component in the owning container | Component | | purgeListeners()
+ Ext.ComponentReturns the previous component in the owning container Returns the previous component in the owning container | Component | | processValue( Mixed value )
+ :
+ voidThis method should only be overridden if necessary to prepare raw values
+for validation (see validate and isValid). ... This method should only be overridden if necessary to prepare raw values
+for validation (see validate and isValid). This method
+is expected to return the processed value for the field which will
+be used for validation (see validateValue method). | Field | | purgeListeners()
:
voidRemoves all listeners for this object Removes all listeners for this object | Observable | | pushValue()
:
- voidProtected method that will not generally be called directly. Pushes the value of the textarea
-into the iframe editor... Protected method that will not generally be called directly. Pushes the value of the textarea
+ void Protected method that will not generally be called directly. Pushes the value of the textarea
+into the iframe editor. Protected method that will not generally be called directly. Pushes the value of the textarea
into the iframe editor. | HtmlEditor | | relayCmd( String cmd , [String/Boolean value ] )
:
- voidExecutes a Midas editor command on the editor document and performs necessary focus and
-toolbar updates. This should... Executes a Midas editor command on the editor document and performs necessary focus and
+ void Executes a Midas editor command on the editor document and performs necessary focus and
+toolbar updates. This should ... Executes a Midas editor command on the editor document and performs necessary focus and
toolbar updates. This should only be called after the editor is initialized. | HtmlEditor | | relayEvents( Object o , Array events )
:
voidRelays selected events from the specified Observable as if the events were fired by this. Relays selected events from the specified Observable as if the events were fired by this. | Observable | | removeClass( string cls )
@@ -706,10 +885,17 @@ See Ext.fo
If events were suspended using the queueSuspended parameter, then all
event...Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
-events fired during event suspension will be sent to any listeners now. | Observable | | setHeight( Number height )
+events fired during event suspension will be sent to any listeners now. | Observable | | setActiveError( String msg , Boolean suppressEvent )
:
- Ext.BoxComponentSets the height of the component. This method fires the resize event. Sets the height of the component. This method fires the resize event. Parameters:height : NumberThe new height to set. This may be one of:
| Field | | setAutoScroll( Boolean scroll )
+ :
+ Ext.BoxComponentSets the overflow on the content element of the component. Sets the overflow on the content element of the component. | BoxComponent | | setHeight( Mixed height )
+ :
+ Ext.BoxComponentSets the height of the component. This method fires the resize event. Sets the height of the component. This method fires the resize event. Parameters:height : MixedThe new height to set. This may be one of:
+- A Number specifying the new height in the Element's defaultUnits (by default, pixels).
- A String used to set the CSS height style.
- undefined to leave the height unchanged.
Returns: | BoxComponent | | setPagePosition( Number x , Number y )
@@ -722,7 +908,9 @@ This method fires the Sets the left and top of the component. To set the page XY position instead, use setPagePosition.
This method fires the move event.Parameters:left : NumberThe new left top : NumberThe new top Returns: | BoxComponent | | setRawValue( Mixed value )
:
- MixedSets the underlying DOM field's value directly, bypassing validation. To set the value with validation see setValue. Sets the underlying DOM field's value directly, bypassing validation. To set the value with validation see setValue. Parameters:value : MixedThe value to set Returns: | Field | | setSize( Mixed width , Mixed height )
+ MixedSets the underlying DOM field's value directly, bypassing validation. To set the value with validation see setValue. Sets the underlying DOM field's value directly, bypassing validation. To set the value with validation see setValue. Parameters:value : MixedThe value to set Returns: | Field | | setReadOnly( Boolean readOnly )
+ :
+ voidSets the read only state of this field. Sets the read only state of this field. | Field | | setSize( Mixed width , Mixed height )
:
Ext.BoxComponentSets the width and height of this BoxComponent. This method fires the resize event. This method can accept
either wid... Sets the width and height of this BoxComponent. This method fires the resize event. This method can accept
@@ -740,10 +928,10 @@ This may be one of: | Field | | setVisible( Boolean visible )
:
- Ext.ComponentConvenience function to hide or show this component by boolean. Convenience function to hide or show this component by boolean. | Component | | setWidth( Number width )
+ Ext.ComponentConvenience function to hide or show this component by boolean. Convenience function to hide or show this component by boolean. | Component | | setWidth( Mixed width )
:
- Ext.BoxComponentSets the width of the component. This method fires the resize event. Sets the width of the component. This method fires the resize event. Parameters:width : NumberThe new width to setThis may be one of:
| BoxComponent | | show()
:
@@ -757,23 +945,40 @@ after the Force the component's size to recalculate based on the underlying element's current height and width. Force the component's size to recalculate based on the underlying element's current height and width. | BoxComponent | | syncValue()
:
- voidProtected method that will not generally be called directly. Syncs the contents
-of the editor iframe with the textar... Protected method that will not generally be called directly. Syncs the contents
+ void Protected method that will not generally be called directly. Syncs the contents
+of the editor iframe with the textare... Protected method that will not generally be called directly. Syncs the contents
of the editor iframe with the textarea. | HtmlEditor | | toggleSourceEdit( [Boolean sourceEdit ] )
:
voidToggles the editor between standard and source edit mode. Toggles the editor between standard and source edit mode. | HtmlEditor | | un( String eventName , Function handler , [Object scope ] )
:
- voidRemoves an event handler (shorthand for removeListener.) | Observable | | updateBox( Object box )
+ voidRemoves an event handler (shorthand for removeListener.) | Observable | | unsetActiveError( Boolean suppressEvent )
+ :
+ voidClears the activeError and fires the 'valid' event. This is called internally by clearInvalid and would not
+usually n... Clears the activeError and fires the 'valid' event. This is called internally by clearInvalid and would not
+usually need to be called manually | Field | | update( Mixed htmlOrData , [Boolean loadScripts ], [Function callback ] )
+ :
+ voidUpdate the content area of a component. Update the content area of a component. Parameters:htmlOrData : MixedIf this component has been configured with a template via the tpl config
+then it will use this argument as data to populate the template.
+If this component was not configured with a template, the components
+content area will be updated via Ext.Element update loadScripts : Boolean(optional) Only legitimate when using the html configuration. Defaults to false callback : Function(optional) Only legitimate when using the html configuration. Callback to execute when scripts have finished loading Returns: | Component | | updateBox( Object box )
:
Ext.BoxComponentSets the current box measurements of the component's underlying element. Sets the current box measurements of the component's underlying element. | BoxComponent | | updateToolbar()
:
- voidProtected method that will not generally be called directly. It triggers
-a toolbar update by reading the markup stat... Protected method that will not generally be called directly. It triggers
-a toolbar update by reading the markup state of the current selection in the editor. | HtmlEditor |
Public Events|
| activate :
+ voidProtected method that will not generally be called directly. It triggers
+a toolbar update by reading the markup state... Protected method that will not generally be called directly. It triggers
+a toolbar update by reading the markup state of the current selection in the editor. | HtmlEditor | | validateValue( Mixed The )
+ :
+ BooleanUses getErrors to build an array of validation errors. If any errors are found, markInvalid is called
+with the first ... Uses getErrors to build an array of validation errors. If any errors are found, markInvalid is called
+with the first and false is returned, otherwise true is returned. Previously, subclasses were invited
+to provide an implementation of this to process validations - from 3.2 onwards getErrors should be
+overridden instead. | Field |
Public Events|
| activate :
( HtmlEditor this )
- Fires when the editor is first receives the focus. Any insertion must wait
-until after this event. Fires when the editor is first receives the focus. Any insertion must wait
-until after this event. Listeners will be called with the following arguments: | HtmlEditor | | afterrender :
+ Fires when the editor is first receives the focus. Any insertion must wait
+until after this event. Fires when the editor is first receives the focus. Any insertion must wait
+until after this event. Listeners will be called with the following arguments: | HtmlEditor | | added :
+ ( Ext.Component this , Ext.Container ownerCt , number index )
+ Fires when a component is added to an Ext.Container Fires when a component is added to an Ext.Container Listeners will be called with the following arguments: | Component | | afterrender :
( Ext.Component this )
Fires after the component rendering is finished.
The afterrender event is fired after this Component has been rendere... Fires after the component rendering is finished.
@@ -787,8 +992,8 @@ has been restored. Fires before the component is hidden by calling the hide method.
Return false from an event handler to stop the hide.Listeners will be called with the following arguments: | Component | | beforepush :
( HtmlEditor this , String html )
- Fires before the iframe editor is updated with content from the textarea. Return false
-to cancel the push. Fires before the iframe editor is updated with content from the textarea. Return false
+ Fires before the iframe editor is updated with content from the textarea. Return false
+to cancel the push. Fires before the iframe editor is updated with content from the textarea. Return false
to cancel the push. Listeners will be called with the following arguments:this : HtmlEditorhtml : String
| HtmlEditor | | beforerender :
( Ext.Component this )
Fires before the component is rendered. Return false from an
@@ -809,8 +1014,8 @@ provide custom state restoration. | | Component | | beforesync :
( HtmlEditor this , String html )
- Fires before the textarea is updated with content from the editor iframe. Return false
-to cancel the sync. Fires before the textarea is updated with content from the editor iframe. Return false
+ Fires before the textarea is updated with content from the editor iframe. Return false
+to cancel the sync. Fires before the textarea is updated with content from the editor iframe. Return false
to cancel the sync. Listeners will be called with the following arguments:this : HtmlEditorhtml : String
| HtmlEditor | | destroy :
( Ext.Component this )
Fires after the component is destroyed. Fires after the component is destroyed. Listeners will be called with the following arguments: | Component | | disable :
@@ -831,7 +1036,9 @@ Fires after the component is hidden when calling the Fires after the component is moved. Fires after the component is moved. Listeners will be called with the following arguments:this : Ext.Componentx : NumberThe new x position y : NumberThe new y position
| BoxComponent | | push :
( HtmlEditor this , String html )
- Fires when the iframe editor is updated with content from the textarea. Fires when the iframe editor is updated with content from the textarea. Listeners will be called with the following arguments:this : HtmlEditorhtml : String
| HtmlEditor | | render :
+ Fires when the iframe editor is updated with content from the textarea. Fires when the iframe editor is updated with content from the textarea. Listeners will be called with the following arguments:this : HtmlEditorhtml : String
| HtmlEditor | | removed :
+ ( Ext.Component this , Ext.Container ownerCt )
+ Fires when a component is removed from an Ext.Container Fires when a component is removed from an Ext.Container Listeners will be called with the following arguments: | Component | | render :
( Ext.Component this )
Fires after the component markup is rendered. Fires after the component markup is rendered. Listeners will be called with the following arguments: | Component | | resize :
( Ext.Component this , Number adjWidth , Number adjHeight , Number rawWidth , Number rawHeight )
|
|