3 * Copyright(c) 2006-2009 Ext JS, LLC
5 * http://www.extjs.com/license
8 * @class Ext.form.HtmlEditor
9 * @extends Ext.form.Field
10 * Provides a lightweight HTML Editor component. Some toolbar features are not supported by Safari and will be
11 * automatically hidden when needed. These are noted in the config options where appropriate.
12 * <br><br>The editor's toolbar buttons have tooltips defined in the {@link #buttonTips} property, but they are not
13 * enabled by default unless the global {@link Ext.QuickTips} singleton is {@link Ext.QuickTips#init initialized}.
14 * <br><br><b>Note: The focus/blur and validation marking functionality inherited from Ext.form.Field is NOT
15 * supported by this editor.</b>
16 * <br><br>An Editor is a sensitive component that can't be used in all spots standard fields can be used. Putting an Editor within
17 * any element that has display set to 'none' can cause problems in Safari and Firefox due to their default iframe reloading bugs.
18 * <br><br>Example usage:
20 // Simple example rendered with default options:
21 Ext.QuickTips.init(); // enable tooltips
22 new Ext.form.HtmlEditor({
23 renderTo: Ext.getBody(),
28 // Passed via xtype into a container and with custom options:
29 Ext.QuickTips.init(); // enable tooltips
32 renderTo: Ext.getBody(),
40 enableAlignments: false
45 * Create a new HtmlEditor
46 * @param {Object} config
50 Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
52 * @cfg {Boolean} enableFormat Enable the bold, italic and underline buttons (defaults to true)
56 * @cfg {Boolean} enableFontSize Enable the increase/decrease font size buttons (defaults to true)
58 enableFontSize : true,
60 * @cfg {Boolean} enableColors Enable the fore/highlight color buttons (defaults to true)
64 * @cfg {Boolean} enableAlignments Enable the left, center, right alignment buttons (defaults to true)
66 enableAlignments : true,
68 * @cfg {Boolean} enableLists Enable the bullet and numbered list buttons. Not available in Safari. (defaults to true)
72 * @cfg {Boolean} enableSourceEdit Enable the switch to source edit button. Not available in Safari. (defaults to true)
74 enableSourceEdit : true,
76 * @cfg {Boolean} enableLinks Enable the create link button. Not available in Safari. (defaults to true)
80 * @cfg {Boolean} enableFont Enable font selection. Not available in Safari. (defaults to true)
84 * @cfg {String} createLinkText The default text for the create link prompt
86 createLinkText : 'Please enter the URL for the link:',
88 * @cfg {String} defaultLinkValue The default value for the create link prompt (defaults to http:/ /)
90 defaultLinkValue : 'http:/'+'/',
92 * @cfg {Array} fontFamilies An array of available font families
101 defaultFont: 'tahoma',
103 * @cfg {String} defaultValue 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).
105 defaultValue: (Ext.isOpera || Ext.isIE6) ? ' ' : '​',
107 // private properties
109 validationEvent : false,
113 sourceEditMode : false,
114 onFocus : Ext.emptyFn,
117 defaultAutoCreate : {
119 style:"width:500px;height:300px;",
124 initComponent : function(){
128 * Fires when the editor is fully initialized (including the iframe)
129 * @param {HtmlEditor} this
134 * Fires when the editor is first receives the focus. Any insertion must wait
135 * until after this event.
136 * @param {HtmlEditor} this
141 * Fires before the textarea is updated with content from the editor iframe. Return false
142 * to cancel the sync.
143 * @param {HtmlEditor} this
144 * @param {String} html
149 * Fires before the iframe editor is updated with content from the textarea. Return false
150 * to cancel the push.
151 * @param {HtmlEditor} this
152 * @param {String} html
157 * Fires when the textarea is updated with content from the editor iframe.
158 * @param {HtmlEditor} this
159 * @param {String} html
164 * Fires when the iframe editor is updated with content from the textarea.
165 * @param {HtmlEditor} this
166 * @param {String} html
170 * @event editmodechange
171 * Fires when the editor switches edit modes
172 * @param {HtmlEditor} this
173 * @param {Boolean} sourceEdit True if source edit, false if standard editing.
180 createFontOptions : function(){
181 var buf = [], fs = this.fontFamilies, ff, lc;
182 for(var i = 0, len = fs.length; i< len; i++){
184 lc = ff.toLowerCase();
186 '<option value="',lc,'" style="font-family:',ff,';"',
187 (this.defaultFont == lc ? ' selected="true">' : '>'),
196 * Protected method that will not generally be called directly. It
197 * is called when the editor creates its toolbar. Override this method if you need to
198 * add custom toolbar buttons.
199 * @param {HtmlEditor} editor
201 createToolbar : function(editor){
203 var tipsEnabled = Ext.QuickTips && Ext.QuickTips.isEnabled();
\r
206 function btn(id, toggle, handler){
210 iconCls: 'x-edit-'+id,
211 enableToggle:toggle !== false,
213 handler:handler||editor.relayBtnCmd,
214 clickEvent:'mousedown',
215 tooltip: tipsEnabled ? editor.buttonTips[id] || undefined : undefined,
216 overflowText: editor.buttonTips[id].title || undefined,
222 if(this.enableFont && !Ext.isSafari2){
\r
223 var fontSelectItem = new Ext.Toolbar.Item({
\r
226 cls:'x-font-select',
\r
227 html: this.createFontOptions()
\r
237 if(this.enableFormat){
245 if(this.enableFontSize){
248 btn('increasefontsize', false, this.adjustFont),
249 btn('decreasefontsize', false, this.adjustFont)
253 if(this.enableColors){
258 iconCls: 'x-edit-forecolor',
259 clickEvent:'mousedown',
260 tooltip: tipsEnabled ? editor.buttonTips.forecolor || undefined : undefined,
262 menu : new Ext.menu.ColorMenu({
269 select: function(cp, color){
270 this.execCmd('forecolor', Ext.isWebKit || Ext.isIE ? '#'+color : color);
274 clickEvent:'mousedown'
279 iconCls: 'x-edit-backcolor',
280 clickEvent:'mousedown',
281 tooltip: tipsEnabled ? editor.buttonTips.backcolor || undefined : undefined,
283 menu : new Ext.menu.ColorMenu({
290 select: function(cp, color){
292 this.execCmd('useCSS', false);
293 this.execCmd('hilitecolor', color);
294 this.execCmd('useCSS', true);
297 this.execCmd(Ext.isOpera ? 'hilitecolor' : 'backcolor', Ext.isWebKit || Ext.isIE ? '#'+color : color);
302 clickEvent:'mousedown'
308 if(this.enableAlignments){
312 btn('justifycenter'),
318 if(this.enableLinks){
321 btn('createlink', false, this.createLink)
325 if(this.enableLists){
328 btn('insertorderedlist'),
329 btn('insertunorderedlist')
332 if(this.enableSourceEdit){
335 btn('sourceedit', true, function(btn){
336 this.toggleSourceEdit(!this.sourceEditMode);
342 // build the toolbar
\r
343 var tb = new Ext.Toolbar({
\r
344 renderTo: this.wrap.dom.firstChild,
\r
348 if (fontSelectItem) {
\r
349 this.fontSelect = fontSelectItem.el;
\r
351 this.mon(this.fontSelect, 'change', function(){
\r
352 var font = this.fontSelect.dom.value;
\r
353 this.relayCmd('fontname', font);
\r
359 // stop form submits
\r
360 this.mon(tb.el, 'click', function(e){
\r
361 e.preventDefault();
\r
369 onDisable: function(){
371 Ext.form.HtmlEditor.superclass.onDisable.call(this);
374 onEnable: function(){
376 Ext.form.HtmlEditor.superclass.onEnable.call(this);
379 setReadOnly: function(readOnly){
380 if(this.initialized){
381 var newDM = readOnly ? 'off' : 'on',
383 if(String(doc.designMode).toLowerCase() != newDM){
384 doc.designMode = newDM;
386 this.disableItems(!readOnly);
388 Ext.form.HtmlEditor.superclass.setReadOnly.call(this, readOnly);
392 * Protected method that will not generally be called directly. It
393 * is called when the editor initializes the iframe with HTML contents. Override this method if you
394 * want to change the initialization markup of the iframe (e.g. to add stylesheets).
396 getDocMarkup : function(){
397 return '<html><head><style type="text/css">body{border:0;margin:0;padding:3px;height:98%;cursor:text;}</style></head><body></body></html>';
401 getEditorBody : function(){
402 var doc = this.getDoc();
403 return doc.body || doc.documentElement;
408 return Ext.isIE ? this.getWin().document : (this.iframe.contentDocument || this.getWin().document);
413 return Ext.isIE ? this.iframe.contentWindow : window.frames[this.iframe.name];
417 onRender : function(ct, position){
418 Ext.form.HtmlEditor.superclass.onRender.call(this, ct, position);
419 this.el.dom.style.border = '0 none';
420 this.el.dom.setAttribute('tabIndex', -1);
421 this.el.addClass('x-hidden');
422 if(Ext.isIE){ // fix IE 1px bogus margin
423 this.el.applyStyles('margin-top:-1px;margin-bottom:-1px;')
425 this.wrap = this.el.wrap({
426 cls:'x-html-editor-wrap', cn:{cls:'x-html-editor-tb'}
429 this.createToolbar(this);
431 this.disableItems(true);
433 // this.tb.doLayout();
438 var sz = this.el.getSize();
439 this.setSize(sz.width, this.height || sz.height);
441 this.resizeEl = this.positionEl = this.wrap;
444 createIFrame: function(){
445 var iframe = document.createElement('iframe');
446 iframe.name = Ext.id();
447 iframe.frameBorder = '0';
448 iframe.src = Ext.SSL_SECURE_URL;
449 this.wrap.dom.appendChild(iframe);
451 this.iframe = iframe;
453 this.monitorTask = Ext.TaskMgr.start({
454 run: this.checkDesignMode,
460 initFrame : function(){
461 Ext.TaskMgr.stop(this.monitorTask);
462 var doc = this.getDoc();
463 this.win = this.getWin();
466 doc.write(this.getDocMarkup());
469 var task = { // must defer to wait for browser to be ready
471 var doc = this.getDoc();
472 if(doc.body || doc.readyState == 'complete'){
473 Ext.TaskMgr.stop(task);
475 this.initEditor.defer(10, this);
482 Ext.TaskMgr.start(task);
486 checkDesignMode : function(){
487 if(this.wrap && this.wrap.dom.offsetWidth){
488 var doc = this.getDoc();
492 if(!doc.editorInitialized || String(doc.designMode).toLowerCase() != 'on'){
498 disableItems: function(disabled){
500 this.fontSelect.dom.disabled = disabled;
502 this.tb.items.each(function(item){
503 if(item.getItemId() != 'sourceedit'){
504 item.setDisabled(disabled);
510 onResize : function(w, h){
511 Ext.form.HtmlEditor.superclass.onResize.apply(this, arguments);
512 if(this.el && this.iframe){
514 var aw = w - this.wrap.getFrameWidth('lr');
515 this.el.setWidth(aw);
516 this.tb.setWidth(aw);
517 this.iframe.style.width = Math.max(aw, 0) + 'px';
520 var ah = h - this.wrap.getFrameWidth('tb') - this.tb.el.getHeight();
521 this.el.setHeight(ah);
522 this.iframe.style.height = Math.max(ah, 0) + 'px';
523 var bd = this.getEditorBody();
525 bd.style.height = Math.max((ah - (this.iframePad*2)), 0) + 'px';
532 * Toggles the editor between standard and source edit mode.
533 * @param {Boolean} sourceEdit (optional) True for source edit, false for standard
535 toggleSourceEdit : function(sourceEditMode){
536 if(sourceEditMode === undefined){
537 sourceEditMode = !this.sourceEditMode;
539 this.sourceEditMode = sourceEditMode === true;
540 var btn = this.tb.getComponent('sourceedit');
542 if(btn.pressed !== this.sourceEditMode){
543 btn.toggle(this.sourceEditMode);
548 if(this.sourceEditMode){
549 this.disableItems(true);
551 this.iframe.className = 'x-hidden';
552 this.el.removeClass('x-hidden');
553 this.el.dom.removeAttribute('tabIndex');
556 if(this.initialized && !this.readOnly){
557 this.disableItems(false);
560 this.iframe.className = '';
561 this.el.addClass('x-hidden');
562 this.el.dom.setAttribute('tabIndex', -1);
565 var lastSize = this.lastSize;
567 delete this.lastSize;
568 this.setSize(lastSize);
570 this.fireEvent('editmodechange', this, this.sourceEditMode);
573 // private used internally
574 createLink : function(){
575 var url = prompt(this.createLinkText, this.defaultLinkValue);
576 if(url && url != 'http:/'+'/'){
577 this.relayCmd('createlink', url);
582 initEvents : function(){
583 this.originalValue = this.getValue();
587 * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
590 markInvalid : Ext.emptyFn,
593 * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
596 clearInvalid : Ext.emptyFn,
598 // docs inherit from Field
599 setValue : function(v){
600 Ext.form.HtmlEditor.superclass.setValue.call(this, v);
606 * Protected method that will not generally be called directly. If you need/want
607 * custom HTML cleanup, this is the method you should override.
608 * @param {String} html The HTML to be cleaned
609 * @return {String} The cleaned HTML
611 cleanHtml: function(html) {
613 if(Ext.isWebKit){ // strip safari nonsense
614 html = html.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi, '');
618 * Neat little hack. Strips out all the non-digit characters from the default
619 * value and compares it to the character code of the first character in the string
620 * because it can cause encoding issues when posted to the server.
622 if(html.charCodeAt(0) == this.defaultValue.replace(/\D/g, '')){
623 html = html.substring(1);
629 * Protected method that will not generally be called directly. Syncs the contents
630 * of the editor iframe with the textarea.
632 syncValue : function(){
633 if(this.initialized){
634 var bd = this.getEditorBody();
635 var html = bd.innerHTML;
637 var bs = bd.getAttribute('style'); // Safari puts text-align styles on the body element!
638 var m = bs.match(/text-align:(.*?);/i);
640 html = '<div style="'+m[0]+'">' + html + '</div>';
643 html = this.cleanHtml(html);
644 if(this.fireEvent('beforesync', this, html) !== false){
645 this.el.dom.value = html;
646 this.fireEvent('sync', this, html);
651 //docs inherit from Field
652 getValue : function() {
653 this[this.sourceEditMode ? 'pushValue' : 'syncValue']();
654 return Ext.form.HtmlEditor.superclass.getValue.call(this);
658 * Protected method that will not generally be called directly. Pushes the value of the textarea
659 * into the iframe editor.
661 pushValue : function(){
662 if(this.initialized){
663 var v = this.el.dom.value;
664 if(!this.activated && v.length < 1){
665 v = this.defaultValue;
667 if(this.fireEvent('beforepush', this, v) !== false){
668 this.getEditorBody().innerHTML = v;
670 // Gecko hack, see: https://bugzilla.mozilla.org/show_bug.cgi?id=232791#c8
671 var d = this.getDoc(),
672 mode = d.designMode.toLowerCase();
674 d.designMode = mode.toggle('on', 'off');
677 this.fireEvent('push', this, v);
683 deferFocus : function(){
684 this.focus.defer(10, this);
687 // docs inherit from Field
689 if(this.win && !this.sourceEditMode){
697 initEditor : function(){
698 //Destroying the component during/before initEditor can cause issues.
700 var dbody = this.getEditorBody(),
701 ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat'),
705 ss['background-attachment'] = 'fixed'; // w3c
706 dbody.bgProperties = 'fixed'; // ie
708 Ext.DomHelper.applyStyles(dbody, ss);
714 Ext.EventManager.removeAll(doc);
719 * We need to use createDelegate here, because when using buffer, the delayed task is added
720 * as a property to the function. When the listener is removed, the task is deleted from the function.
721 * Since onEditorEvent is shared on the prototype, if we have multiple html editors, the first time one of the editors
722 * is destroyed, it causes the fn to be deleted from the prototype, which causes errors. Essentially, we're just anonymizing the function.
724 fn = this.onEditorEvent.createDelegate(this);
725 Ext.EventManager.on(doc, {
734 Ext.EventManager.on(doc, 'keypress', this.applyCommand, this);
736 if(Ext.isIE || Ext.isWebKit || Ext.isOpera){
737 Ext.EventManager.on(doc, 'keydown', this.fixKeys, this);
739 doc.editorInitialized = true;
740 this.initialized = true;
742 this.setReadOnly(this.readOnly);
743 this.fireEvent('initialize', this);
748 onDestroy : function(){
749 if(this.monitorTask){
750 Ext.TaskMgr.stop(this.monitorTask);
753 Ext.destroy(this.tb);
754 var doc = this.getDoc();
757 Ext.EventManager.removeAll(doc);
758 for (var prop in doc){
764 this.wrap.dom.innerHTML = '';
770 this.el.removeAllListeners();
773 this.purgeListeners();
777 onFirstFocus : function(){
778 this.activated = true;
779 this.disableItems(false);
780 if(Ext.isGecko){ // prevent silly gecko errors
782 var s = this.win.getSelection();
783 if(!s.focusNode || s.focusNode.nodeType != 3){
784 var r = s.getRangeAt(0);
785 r.selectNodeContents(this.getEditorBody());
790 this.execCmd('useCSS', true);
791 this.execCmd('styleWithCSS', false);
794 this.fireEvent('activate', this);
798 adjustFont: function(btn){
799 var adjust = btn.getItemId() == 'increasefontsize' ? 1 : -1,
801 v = parseInt(doc.queryCommandValue('FontSize') || 2, 10);
802 if((Ext.isSafari && !Ext.isSafari2) || Ext.isChrome || Ext.isAir){
804 // 1 = 10px, 2 = 13px, 3 = 16px, 4 = 18px, 5 = 24px, 6 = 32px
818 v = v.constrain(1, 6);
820 if(Ext.isSafari){ // safari
823 v = Math.max(1, v+adjust) + (Ext.isSafari ? 'px' : 0);
825 this.execCmd('FontSize', v);
829 onEditorEvent : function(e){
830 this.updateToolbar();
835 * Protected method that will not generally be called directly. It triggers
836 * a toolbar update by reading the markup state of the current selection in the editor.
838 updateToolbar: function(){
849 var btns = this.tb.items.map,
852 if(this.enableFont && !Ext.isSafari2){
853 var name = (doc.queryCommandValue('FontName')||this.defaultFont).toLowerCase();
854 if(name != this.fontSelect.dom.value){
855 this.fontSelect.dom.value = name;
858 if(this.enableFormat){
859 btns.bold.toggle(doc.queryCommandState('bold'));
860 btns.italic.toggle(doc.queryCommandState('italic'));
861 btns.underline.toggle(doc.queryCommandState('underline'));
863 if(this.enableAlignments){
864 btns.justifyleft.toggle(doc.queryCommandState('justifyleft'));
865 btns.justifycenter.toggle(doc.queryCommandState('justifycenter'));
866 btns.justifyright.toggle(doc.queryCommandState('justifyright'));
868 if(!Ext.isSafari2 && this.enableLists){
869 btns.insertorderedlist.toggle(doc.queryCommandState('insertorderedlist'));
870 btns.insertunorderedlist.toggle(doc.queryCommandState('insertunorderedlist'));
873 Ext.menu.MenuMgr.hideAll();
879 relayBtnCmd : function(btn){
880 this.relayCmd(btn.getItemId());
884 * Executes a Midas editor command on the editor document and performs necessary focus and
885 * toolbar updates. <b>This should only be called after the editor is initialized.</b>
886 * @param {String} cmd The Midas command
887 * @param {String/Boolean} value (optional) The value to pass to the command (defaults to null)
889 relayCmd : function(cmd, value){
892 this.execCmd(cmd, value);
893 this.updateToolbar();
898 * Executes a Midas editor command directly on the editor document.
899 * For visual commands, you should use {@link #relayCmd} instead.
900 * <b>This should only be called after the editor is initialized.</b>
901 * @param {String} cmd The Midas command
902 * @param {String/Boolean} value (optional) The value to pass to the command (defaults to null)
904 execCmd : function(cmd, value){
905 var doc = this.getDoc();
906 doc.execCommand(cmd, false, value === undefined ? null : value);
911 applyCommand : function(e){
913 var c = e.getCharCode(), cmd;
915 c = String.fromCharCode(c);
938 * Inserts the passed text at the current cursor position. Note: the editor must be initialized and activated
940 * @param {String} text
942 insertAtCursor : function(text){
948 var doc = this.getDoc(),
949 r = doc.selection.createRange();
957 this.execCmd('InsertHTML', text);
963 fixKeys : function(){ // load time branching for fastest keydown performance
971 r = doc.selection.createRange();
974 r.pasteHTML(' ');
977 }else if(k == e.ENTER){
978 r = doc.selection.createRange();
980 var target = r.parentElement();
981 if(!target || target.tagName.toLowerCase() != 'li'){
983 r.pasteHTML('<br />');
990 }else if(Ext.isOpera){
996 this.execCmd('InsertHTML',' ');
1000 }else if(Ext.isWebKit){
1005 this.execCmd('InsertText','\t');
1007 }else if(k == e.ENTER){
1009 this.execCmd('InsertHtml','<br /><br />');
1017 * Returns the editor's toolbar. <b>This is only available after the editor has been rendered.</b>
1018 * @return {Ext.Toolbar}
1020 getToolbar : function(){
1025 * Object collection of toolbar tooltips for the buttons in the editor. The key
1026 * is the command id associated with that button and the value is a valid QuickTips object.
1031 title: 'Bold (Ctrl+B)',
1032 text: 'Make the selected text bold.',
1033 cls: 'x-html-editor-tip'
1036 title: 'Italic (Ctrl+I)',
1037 text: 'Make the selected text italic.',
1038 cls: 'x-html-editor-tip'
1046 title: 'Bold (Ctrl+B)',
1047 text: 'Make the selected text bold.',
1048 cls: 'x-html-editor-tip'
1051 title: 'Italic (Ctrl+I)',
1052 text: 'Make the selected text italic.',
1053 cls: 'x-html-editor-tip'
1056 title: 'Underline (Ctrl+U)',
1057 text: 'Underline the selected text.',
1058 cls: 'x-html-editor-tip'
1060 increasefontsize : {
1062 text: 'Increase the font size.',
1063 cls: 'x-html-editor-tip'
1065 decreasefontsize : {
1066 title: 'Shrink Text',
1067 text: 'Decrease the font size.',
1068 cls: 'x-html-editor-tip'
1071 title: 'Text Highlight Color',
1072 text: 'Change the background color of the selected text.',
1073 cls: 'x-html-editor-tip'
1076 title: 'Font Color',
1077 text: 'Change the color of the selected text.',
1078 cls: 'x-html-editor-tip'
1081 title: 'Align Text Left',
1082 text: 'Align text to the left.',
1083 cls: 'x-html-editor-tip'
1086 title: 'Center Text',
1087 text: 'Center text in the editor.',
1088 cls: 'x-html-editor-tip'
1091 title: 'Align Text Right',
1092 text: 'Align text to the right.',
1093 cls: 'x-html-editor-tip'
1095 insertunorderedlist : {
1096 title: 'Bullet List',
1097 text: 'Start a bulleted list.',
1098 cls: 'x-html-editor-tip'
1100 insertorderedlist : {
1101 title: 'Numbered List',
1102 text: 'Start a numbered list.',
1103 cls: 'x-html-editor-tip'
1107 text: 'Make the selected text a hyperlink.',
1108 cls: 'x-html-editor-tip'
1111 title: 'Source Edit',
1112 text: 'Switch to source editing mode.',
1113 cls: 'x-html-editor-tip'
1117 // hide stuff that is not compatible
1135 * @cfg {String} fieldClass @hide
1138 * @cfg {String} focusClass @hide
1141 * @cfg {String} autoCreate @hide
1144 * @cfg {String} inputType @hide
1147 * @cfg {String} invalidClass @hide
1150 * @cfg {String} invalidText @hide
1153 * @cfg {String} msgFx @hide
1156 * @cfg {String} validateOnBlur @hide
1159 * @cfg {Boolean} allowDomMove @hide
1162 * @cfg {String} applyTo @hide
1165 * @cfg {String} autoHeight @hide
1168 * @cfg {String} autoWidth @hide
1171 * @cfg {String} cls @hide
1174 * @cfg {String} disabled @hide
1177 * @cfg {String} disabledClass @hide
1180 * @cfg {String} msgTarget @hide
1183 * @cfg {String} readOnly @hide
1186 * @cfg {String} style @hide
1189 * @cfg {String} validationDelay @hide
1192 * @cfg {String} validationEvent @hide
1195 * @cfg {String} tabIndex @hide
1198 * @property disabled
1202 * @method applyToMarkup
1222 * @method setDisabled
1230 Ext.reg('htmleditor', Ext.form.HtmlEditor);