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 Options Defined By
  createLinkText : String
The default text for the create link prompt
HtmlEditor
  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
  height : Number
The height of this component in pixels (defaults to auto).
BoxComponent
  hidden : Boolean
Render this component hidden (default is false).
Component
  name : String
The field's HTML name attribute (defaults to "").
Field
  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
  value : Mixed
A value to initialize this field with (defaults to undefined).
Field
  width : Number
The width of this component in pixels (defaults to auto).
BoxComponent
  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

Property Defined 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

Method Defined By

Public Events

Event Defined By