Properties Methods Events Config Options Direct Link
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 OptionsDefined By
 createLinkText : String
The default text for the create link prompt
HtmlEditor
 data : Mixed
The 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
 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
 fontFamilies : Array
An array of available font families
HtmlEditor
 hidden : Boolean
Render this component hidden (default is false). If true, the hide method will be called internally.
Component
 pageX : Number
The page level x coordinate for this component if contained within a positioning container.
BoxComponent
 pageY : Number
The page level y coordinate for this component if contained within a positioning container.
BoxComponent
 preventMark : Boolean
true to disable marking the field invalid. Defaults to false.
Field
 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
 value : Mixed
A value to initialize this field with (defaults to undefined).
Field
 x : Number
The local x (left) coordinate for this component if contained within a positioning container.
BoxComponent
 y : Number
The local y (top) coordinate for this component if contained within a positioning container.
BoxComponent

Public Properties

PropertyDefined By
 hidden : Boolean
True if this component is hidden. Read-only.
Component
 initialConfig : Object
This Component's initial configuration specification. Read-only.
Component
 rendered : Boolean
True if this component has been rendered. Read-only.
Component

Public Methods

MethodDefined By

Public Events

EventDefined By