X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..10a866c12701c0a0afd0ac85dcdcf32a421514ac:/docs/output/Ext.form.HtmlEditor.html?ds=sidebyside diff --git a/docs/output/Ext.form.HtmlEditor.html b/docs/output/Ext.form.HtmlEditor.html index 08312a56..ce7c649e 100644 --- a/docs/output/Ext.form.HtmlEditor.html +++ b/docs/output/Ext.form.HtmlEditor.html @@ -1,34 +1,34 @@ -
Observable Component BoxComponent Field HtmlEditor
Package: | Ext.form |
Defined In: | HtmlEditor.js |
Class: | HtmlEditor |
Extends: | Field |
xtype: | htmleditor |
// 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
- }
+Observable
Component
BoxComponent
Field
HtmlEditor
Class Ext.form.HtmlEditor
Package: Ext.form Defined In: HtmlEditor.js Class: HtmlEditor Extends: Field
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
Config Options Defined By 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
@@ -65,9 +65,19 @@ different DOM elements. Example usage:
{
autoEl: 'li',
html: 'First list item'
}
-}
Component autoShow : BooleanTrue if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
+} 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 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').
@@ -75,7 +85,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 : StringThe 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
+See Ext.layout.FormLayout.fieldTpl also.
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 : StringThe 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.
@@ -86,7 +110,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 : StringThe 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 : BooleanEnable the left, center, right alignment buttons (defaults to true) HtmlEditor enableColors : BooleanEnable the fore/highlight color buttons (defaults to true) HtmlEditor enableFont : BooleanEnable font selection. Not available in Safari. (defaults to true) HtmlEditor enableFontSize : BooleanEnable the increase/decrease font size buttons (defaults to true) HtmlEditor enableFormat : BooleanEnable the bold, italic and underline buttons (defaults to true) HtmlEditor enableLinks : BooleanEnable the create link button. Not available in Safari. (defaults to true) HtmlEditor enableLists : BooleanEnable the bullet and numbered list buttons. Not available in Safari. (defaults to true) HtmlEditor enableSourceEdit : BooleanEnable 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 : StringThe 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 : BooleanEnable the left, center, right alignment buttons (defaults to true) HtmlEditor enableColors : BooleanEnable the fore/highlight color buttons (defaults to true) HtmlEditor enableFont : BooleanEnable font selection. Not available in Safari. (defaults to true) HtmlEditor enableFontSize : BooleanEnable the increase/decrease font size buttons (defaults to true) HtmlEditor enableFormat : BooleanEnable the bold, italic and underline buttons (defaults to true) HtmlEditor enableLinks : BooleanEnable the create link button. Not available in Safari. (defaults to true) HtmlEditor enableLists : BooleanEnable the bullet and numbered list buttons. Not available in Safari. (defaults to true) HtmlEditor enableSourceEdit : BooleanEnable 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.
@@ -127,7 +152,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).
@@ -315,7 +344,18 @@ 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 '').
+Defaults to:
{top:0, right:0, bottom:0, left:0}
BoxComponent msgTarget<p>The : Stringlocation where the message text set through markInvalid should display.
+Must be one of the following values:
+<div cl...location where the message text set through markInvalid should display.
+Must be one of the following values:
+
+qtip
Display a quick tip containing the message when the user hovers over the field. This is the default.
+Ext.QuickTips.init must have been called for this setting to work.
+title
Display the message in a default browser title attribute popup.
+under
Add a block div beneath the field containing the error message.
+side
Add an error icon to the right of the field, displaying the message in a popup on hover.
+[element id]
Add the error message directly to the innerHTML of the specified element.
+
Field 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
@@ -336,9 +376,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',
@@ -357,9 +397,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 : String 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').
@@ -422,11 +463,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 tabTip : StringNote: this config is only used when this BoxComponent is a child item of a TabPanel.
+beforestatesave and statesave events. Component submitValue : BooleanFalse 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 value : MixedA value to initialize this field with (defaults to undefined). Field width : NumberThe width of this component in pixels (defaults to auto).
+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...An Ext.Template , Ext.XTemplate
+or an array of strings to form an Ext.XTemplate.
+Used in conjunction with the data
and
+tplWriteMode
configurations. 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 : MixedA 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 : NumberThe 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
@@ -439,21 +490,21 @@ The predefined xtypes are listed Ext.ComponentMgr.registerType in order to be able to
-take advantage of lazy instantiation and rendering. Component y : NumberThe local y (top) coordinate for this component if contained within a positioning container. BoxComponent
Public Properties
Property Defined By 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 : NumberThe local y (top) coordinate for this component if contained within a positioning container. BoxComponent
Public Properties
Property Defined By 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
@@ -471,14 +522,21 @@ config for a suggestion, or use a render listener directly:
new
single: true // Remove the listener after first invocation
}
});
-See also getEl
Component hidden : BooleanTrue if this component is hidden. Read-only. Component initialConfig : ObjectThis 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 : BooleanTrue if this component is hidden. Read-only. Component initialConfig : ObjectThis 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.ContainerThis Component's owner Container (defaults to undefined, and is set automatically when
this Component is added to a C... Component rendered : BooleanTrue if this component has been rendered. Read-only. Component
Public Methods
Method Defined By HtmlEditor( Object config
)
- Create a new HtmlEditorCreate a new HtmlEditorParameters:config
: Object
Returns:- void
xtype: htmleditor
HtmlEditor addClass( string cls
)
+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 : BooleanTrue 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
Method Defined By HtmlEditor( Object config
)
+ Create a new HtmlEditorCreate a new HtmlEditorParameters:config
: Object
Returns:- void
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.Parameters:cls
: stringThe CSS class name to add
Returns:Ext.Component
this
Component addEvents( Object|String o
, string Optional.
)
:
@@ -537,8 +595,8 @@ Or a shorthand syntax:
scope: this
});Returns:- void
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
+ 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:String
The cleaned HTML
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.
@@ -548,7 +606,7 @@ 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.Parameters:- None.
Returns:- void
Component enableBubble( Object events
)
+should usually not need to be called directly.Parameters:- None.
Returns:- void
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
@@ -557,13 +615,13 @@ this.getBubbleTarget() if present...
Enables events fi
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');
+ // 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() {
+ // We know that we want Field's events to bubble directly to the FormPanel.
+ getBubbleTarget : function() {
if (!this.formPanel) {
this.formPanel = this.findParentByType('form');
}
@@ -578,15 +636,15 @@ access the required target more quickly.
}],
listeners: {
change: function() {
-// Title goes red if form has been modified.
- myForm.header.setStyle("color", "red");
+ // Title goes red if form has been modified.
+ myForm.header.setStyle('color', 'red');
}
}
-});
Parameters:events
: ObjectThe event name to bubble, or an Array of event names.
Returns:- void
Observable execCmd( String cmd
, [String/Boolean value
] )
+});Parameters:events
: String/ArrayThe event name to bubble, or an Array of event names.
Returns:- void
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.
+ voidExecutes 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.Parameters:cmd
: StringThe Midas commandvalue
: String/Boolean(optional) The value to pass to the command (defaults to null)
Returns:- void
HtmlEditor findParentBy( Function fn
)
:
Ext.ContainerFind a container above this component at any level by a custom function. If the passed function returns
@@ -600,15 +658,17 @@ An event may be set to bubble up an Obse...Fires the
An event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget)
by calling enableBubble.
Parameters:eventName
: StringThe name of the event to fire.args
: Object...Variable number of parameters are passed to handlers.
Returns:Boolean
returns false if any of the handlers return false otherwise it returns true.
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 componentdelay
: Boolean/Number(optional) Delay the focus this number of milliseconds (true for 10 milliseconds)
Returns:Ext.Component
this
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 componentdelay
: Boolean/Number(optional) Delay the focus this number of milliseconds (true for 10 milliseconds)
Returns:Ext.Component
this
Component getActiveError()
+ :
+ StringGets the active error message for this field.Gets the active error message for this field.Parameters:- None.
Returns:String
Returns the active error message on the field, if there is no error, an empty string is returned.
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.Parameters:local
: Boolean(optional) If true the element's left and top are returned instead of page XY (defaults to false)
Returns:Object
box An object in the format {x, y, width, height}
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.Parameters:- None.
Returns:Ext.Container
the Container which owns this Component.
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
+ 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).Parameters:- None.
Returns:- void
HtmlEditor getEl()
:
Ext.ElementReturns the Ext.Element which encapsulates this Component.
@@ -651,7 +711,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:- None.
Returns:Mixed
value The field value
Field getResizeEl()
:
- voidReturns the outermost Element of this Component which defines the Components overall size.
+ Ext.ElementReturns 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
@@ -659,7 +719,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
.
Parameters:- None.
Returns:- void
BoxComponent getSize()
+This Element is returned as the resizeEl
.Parameters:- None.
Returns:Ext.Element
The Element which is to be resized by size managing layouts.
BoxComponent getSize()
:
ObjectGets the current size of the component's underlying element.Gets the current size of the component's underlying element.Parameters:- None.
Returns:Object
An object containing the element's size {width: (element width), height: (element height)}
BoxComponent getToolbar()
:
@@ -692,8 +752,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
.Parameters:- None.
Returns:Ext.Component
this
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
+ 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
to insert text.Parameters:text
: String
Returns:- void
HtmlEditor isDirty()
:
BooleanReturns true if the value of this Field has been changed from its original value.
@@ -724,7 +784,26 @@ to participate in determination of inherited xtypes.
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 instanceParameters:xtype
: StringThe xtype to check for this Componentshallow
: 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:Boolean
True if this component descends from the specified xtype, false otherwise.
Component nextSibling()
+the default), or true to check whether this Component is directly of the specified xtype.Returns:Boolean
True if this component descends from the specified xtype, false otherwise.
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:- void
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:- void
Component nextSibling()
:
Ext.ComponentReturns the next component in the owning containerReturns the next component in the owning containerParameters:- None.
Returns:Ext.Component
Component on( String eventName
, Function handler
, [Object scope
], [Object options
] )
:
@@ -741,12 +820,12 @@ be used for validation (see validateValue method).Removes all listeners for this objectRemoves all listeners for this objectParameters:- None.
Returns:- void
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
+ 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
into the iframe editor.Parameters:- None.
Returns:- void
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
+ 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
toolbar updates. This should only be called after the editor is initialized.Parameters:cmd
: StringThe Midas commandvalue
: String/Boolean(optional) The value to pass to the command (defaults to null)
Returns:- void
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.Parameters:o
: ObjectThe Observable whose events this object is to relay.events
: ArrayArray of event names to relay.
Returns:- void
Observable removeClass( string cls
)
@@ -787,7 +866,9 @@ 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.Parameters:- None.
Returns:- void
Observable setHeight( Number height
)
+events fired during event suspension will be sent to any listeners now.Parameters:- None.
Returns:- void
Observable setAutoScroll( Boolean scroll
)
+ :
+ Ext.BoxComponentSets the overflow on the content element of the component.Sets the overflow on the content element of the component.Parameters:scroll
: BooleanTrue to allow the Component to auto scroll.
Returns:Ext.BoxComponent
this
BoxComponent setHeight( Number 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
: NumberThe new height to set. This may be one of:
- A Number specifying the new height in the Element's Ext.Element.defaultUnits (by default, pixels).
@@ -803,7 +884,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 lefttop
: NumberThe new top
Returns:Ext.BoxComponent
this
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:Mixed
value The field value that is set
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:Mixed
value The field value that is set
Field setReadOnly( Boolean readOnly
)
+ :
+ voidSets the read only state of this field.Sets the read only state of this field.Parameters:readOnly
: BooleanWhether the field should be read only.
Returns:- void
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
@@ -838,23 +921,30 @@ 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.Parameters:- None.
Returns:Ext.BoxComponent
this
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
+ voidProtected 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.Parameters:- None.
Returns:- void
HtmlEditor toggleSourceEdit( [Boolean sourceEdit
] )
:
voidToggles the editor between standard and source edit mode.Toggles the editor between standard and source edit mode.Parameters:sourceEdit
: Boolean(optional) True for source edit, false for standard
Returns:- void
HtmlEditor un( String eventName
, Function handler
, [Object scope
] )
:
- voidRemoves an event handler (shorthand for removeListener.)Removes an event handler (shorthand for removeListener.)Parameters:eventName
: StringThe type of event the handler was associated with.handler
: FunctionThe handler to remove. This must be a reference to the function passed into the addListener call.scope
: Object(optional) The scope originally specified for the handler.
Returns:- void
Observable updateBox( Object box
)
+ voidRemoves an event handler (shorthand for removeListener.)Removes an event handler (shorthand for removeListener.)Parameters:eventName
: StringThe type of event the handler was associated with.handler
: FunctionThe handler to remove. This must be a reference to the function passed into the addListener call.scope
: Object(optional) The scope originally specified for the handler.
Returns:- void
Observable 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 updateloadScripts
: Boolean(optional) Only legitimate when using the html configuration. Defaults to falsecallback
: Function(optional) Only legitimate when using the html configuration. Callback to execute when scripts have finished loading
Returns:- void
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.Parameters:box
: ObjectAn object in the format {x, y, width, height}
Returns:Ext.BoxComponent
this
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
+ 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.Parameters:- None.
Returns:- void
HtmlEditor
Public Events
Event Defined By 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:this
: HtmlEditor
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:this
: HtmlEditor
HtmlEditor added :
+ ( Ext.Component this
, Ext.Container ownerCt
, number index
)
+ Fires when a component is added to an Ext.ContainerFires when a component is added to an Ext.ContainerListeners will be called with the following arguments:this
: Ext.ComponentownerCt
: Ext.ContainerContainer which holds the componentindex
: numberPosition at which the component was added
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.
@@ -868,8 +958,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:this
: Ext.Component
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
@@ -890,8 +980,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:this
: Ext.Component
Component disable :
@@ -912,7 +1002,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 positiony
: 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.ContainerFires when a component is removed from an Ext.ContainerListeners will be called with the following arguments:this
: Ext.ComponentownerCt
: Ext.ContainerContainer which holds the component
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:this
: Ext.Component
Component resize :
( Ext.Component this
, Number adjWidth
, Number adjHeight
, Number rawWidth
, Number rawHeight
)