HtmlEditor2.html
50.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
<script type="text/javascript">
function highlight() {
document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
}
</script>
</head>
<body onload="prettyPrint(); highlight();">
<pre class="prettyprint lang-js"><span id='Ext-form-field-HtmlEditor'>/**
</span> * 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 {@link #buttonTips} property, but they are not
* enabled by default unless the global {@link Ext.tip.QuickTipManager} singleton is
* {@link Ext.tip.QuickTipManager#init initialized}.
*
* 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:
*
* @example
* Ext.tip.QuickTipManager.init(); // enable tooltips
* Ext.create('Ext.form.HtmlEditor', {
* width: 580,
* height: 250,
* renderTo: Ext.getBody()
* });
*
* Passed via xtype into a container and with custom options:
*
* @example
* Ext.tip.QuickTipManager.init(); // enable tooltips
* new Ext.panel.Panel({
* title: 'HTML Editor',
* renderTo: Ext.getBody(),
* width: 550,
* height: 250,
* frame: true,
* layout: 'fit',
* items: {
* xtype: 'htmleditor',
* enableColors: false,
* enableAlignments: false
* }
* });
*
* # Reflow issues
*
* In some browsers, a layout reflow will cause the underlying editor iframe to be reset. This
* is most commonly seen when using the editor in collapsed panels with animation. In these cases
* it is best to avoid animation. More information can be found here: https://bugzilla.mozilla.org/show_bug.cgi?id=90268
*/
Ext.define('Ext.form.field.HtmlEditor', {
extend:'Ext.Component',
mixins: {
labelable: 'Ext.form.Labelable',
field: 'Ext.form.field.Field'
},
alias: 'widget.htmleditor',
alternateClassName: 'Ext.form.HtmlEditor',
requires: [
'Ext.tip.QuickTipManager',
'Ext.picker.Color',
'Ext.toolbar.Item',
'Ext.toolbar.Toolbar',
'Ext.util.Format',
'Ext.layout.component.field.HtmlEditor'
],
childEls: [
'iframeEl', 'textareaEl'
],
fieldSubTpl: [
'{beforeTextAreaTpl}',
'<textarea id="{cmpId}-textareaEl" name="{name}" tabIndex="-1" {inputAttrTpl}',
' class="{textareaCls}" style="{size}" autocomplete="off">',
'{[Ext.util.Format.htmlEncode(values.value)]}',
'</textarea>',
'{afterTextAreaTpl}',
'{beforeIFrameTpl}',
'<iframe id="{cmpId}-iframeEl" name="{iframeName}" frameBorder="0" {iframeAttrTpl}',
' style="overflow:auto;{size}" src="{iframeSrc}"></iframe>',
'{afterIFrameTpl}',
{
disableFormats: true
}
],
subTplInsertions: [
<span id='Ext-form-field-HtmlEditor-cfg-beforeTextAreaTpl'> /**
</span> * @cfg {String/Array/Ext.XTemplate} beforeTextAreaTpl
* An optional string or `XTemplate` configuration to insert in the field markup
* before the textarea element. If an `XTemplate` is used, the component's
* {@link Ext.form.field.Base#getSubTplData subTpl data} serves as the context.
*/
'beforeTextAreaTpl',
<span id='Ext-form-field-HtmlEditor-cfg-afterTextAreaTpl'> /**
</span> * @cfg {String/Array/Ext.XTemplate} afterTextAreaTpl
* An optional string or `XTemplate` configuration to insert in the field markup
* after the textarea element. If an `XTemplate` is used, the component's
* {@link Ext.form.field.Base#getSubTplData subTpl data} serves as the context.
*/
'afterTextAreaTpl',
<span id='Ext-form-field-HtmlEditor-cfg-beforeIFrameTpl'> /**
</span> * @cfg {String/Array/Ext.XTemplate} beforeIFrameTpl
* An optional string or `XTemplate` configuration to insert in the field markup
* before the iframe element. If an `XTemplate` is used, the component's
* {@link Ext.form.field.Base#getSubTplData subTpl data} serves as the context.
*/
'beforeIFrameTpl',
<span id='Ext-form-field-HtmlEditor-cfg-afterIFrameTpl'> /**
</span> * @cfg {String/Array/Ext.XTemplate} afterIFrameTpl
* An optional string or `XTemplate` configuration to insert in the field markup
* after the iframe element. If an `XTemplate` is used, the component's
* {@link Ext.form.field.Base#getSubTplData subTpl data} serves as the context.
*/
'afterIFrameTpl',
<span id='Ext-form-field-HtmlEditor-cfg-iframeAttrTpl'> /**
</span> * @cfg {String/Array/Ext.XTemplate} iframeAttrTpl
* An optional string or `XTemplate` configuration to insert in the field markup
* inside the iframe element (as attributes). If an `XTemplate` is used, the component's
* {@link Ext.form.field.Base#getSubTplData subTpl data} serves as the context.
*/
'iframeAttrTpl',
// inherited
'inputAttrTpl'
],
<span id='Ext-form-field-HtmlEditor-cfg-enableFormat'> /**
</span> * @cfg {Boolean} enableFormat
* Enable the bold, italic and underline buttons
*/
enableFormat : true,
<span id='Ext-form-field-HtmlEditor-cfg-enableFontSize'> /**
</span> * @cfg {Boolean} enableFontSize
* Enable the increase/decrease font size buttons
*/
enableFontSize : true,
<span id='Ext-form-field-HtmlEditor-cfg-enableColors'> /**
</span> * @cfg {Boolean} enableColors
* Enable the fore/highlight color buttons
*/
enableColors : true,
<span id='Ext-form-field-HtmlEditor-cfg-enableAlignments'> /**
</span> * @cfg {Boolean} enableAlignments
* Enable the left, center, right alignment buttons
*/
enableAlignments : true,
<span id='Ext-form-field-HtmlEditor-cfg-enableLists'> /**
</span> * @cfg {Boolean} enableLists
* Enable the bullet and numbered list buttons. Not available in Safari.
*/
enableLists : true,
<span id='Ext-form-field-HtmlEditor-cfg-enableSourceEdit'> /**
</span> * @cfg {Boolean} enableSourceEdit
* Enable the switch to source edit button. Not available in Safari.
*/
enableSourceEdit : true,
<span id='Ext-form-field-HtmlEditor-cfg-enableLinks'> /**
</span> * @cfg {Boolean} enableLinks
* Enable the create link button. Not available in Safari.
*/
enableLinks : true,
<span id='Ext-form-field-HtmlEditor-cfg-enableFont'> /**
</span> * @cfg {Boolean} enableFont
* Enable font selection. Not available in Safari.
*/
enableFont : true,
//<locale>
<span id='Ext-form-field-HtmlEditor-cfg-createLinkText'> /**
</span> * @cfg {String} createLinkText
* The default text for the create link prompt
*/
createLinkText : 'Please enter the URL for the link:',
//</locale>
<span id='Ext-form-field-HtmlEditor-cfg-defaultLinkValue'> /**
</span> * @cfg {String} [defaultLinkValue='http://']
* The default value for the create link prompt
*/
defaultLinkValue : 'http:/'+'/',
<span id='Ext-form-field-HtmlEditor-cfg-fontFamilies'> /**
</span> * @cfg {String[]} fontFamilies
* An array of available font families
*/
fontFamilies : [
'Arial',
'Courier New',
'Tahoma',
'Times New Roman',
'Verdana'
],
defaultFont: 'tahoma',
<span id='Ext-form-field-HtmlEditor-cfg-defaultValue'> /**
</span> * @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.
*/
defaultValue: (Ext.isOpera || Ext.isIE6) ? '&#160;' : '&#8203;',
editorWrapCls: Ext.baseCSSPrefix + 'html-editor-wrap',
componentLayout: 'htmleditor',
// private properties
initialized : false,
activated : false,
sourceEditMode : false,
iframePad:3,
hideMode:'offsets',
afterBodyEl: '</div>',
maskOnDisable: true,
// private
initComponent : function(){
var me = this;
me.addEvents(
<span id='Ext-form-field-HtmlEditor-event-initialize'> /**
</span> * @event initialize
* Fires when the editor is fully initialized (including the iframe)
* @param {Ext.form.field.HtmlEditor} this
*/
'initialize',
<span id='Ext-form-field-HtmlEditor-event-activate'> /**
</span> * @event activate
* Fires when the editor is first receives the focus. Any insertion must wait until after this event.
* @param {Ext.form.field.HtmlEditor} this
*/
'activate',
<span id='Ext-form-field-HtmlEditor-event-beforesync'> /**
</span> * @event beforesync
* Fires before the textarea is updated with content from the editor iframe. Return false to cancel the
* sync.
* @param {Ext.form.field.HtmlEditor} this
* @param {String} html
*/
'beforesync',
<span id='Ext-form-field-HtmlEditor-event-beforepush'> /**
</span> * @event beforepush
* Fires before the iframe editor is updated with content from the textarea. Return false to cancel the
* push.
* @param {Ext.form.field.HtmlEditor} this
* @param {String} html
*/
'beforepush',
<span id='Ext-form-field-HtmlEditor-event-sync'> /**
</span> * @event sync
* Fires when the textarea is updated with content from the editor iframe.
* @param {Ext.form.field.HtmlEditor} this
* @param {String} html
*/
'sync',
<span id='Ext-form-field-HtmlEditor-event-push'> /**
</span> * @event push
* Fires when the iframe editor is updated with content from the textarea.
* @param {Ext.form.field.HtmlEditor} this
* @param {String} html
*/
'push',
<span id='Ext-form-field-HtmlEditor-event-editmodechange'> /**
</span> * @event editmodechange
* Fires when the editor switches edit modes
* @param {Ext.form.field.HtmlEditor} this
* @param {Boolean} sourceEdit True if source edit, false if standard editing.
*/
'editmodechange'
);
me.callParent(arguments);
me.createToolbar(me);
// Init mixins
me.initLabelable();
me.initField();
},
<span id='Ext-form-field-HtmlEditor-method-getRefItems'> /**
</span> * @private
* Must define this function to allow the Layout base class to collect all descendant layouts to be run.
*/
getRefItems: function() {
return [ this.toolbar ];
},
/*
* Called when the editor creates its toolbar. Override this method if you need to
* add custom toolbar buttons.
* @param {Ext.form.field.HtmlEditor} editor
* @protected
*/
createToolbar : function(editor){
var me = this,
items = [], i,
tipsEnabled = Ext.tip.QuickTipManager && Ext.tip.QuickTipManager.isEnabled(),
baseCSSPrefix = Ext.baseCSSPrefix,
fontSelectItem, toolbar, undef;
function btn(id, toggle, handler){
return {
itemId : id,
cls : baseCSSPrefix + 'btn-icon',
iconCls: baseCSSPrefix + 'edit-'+id,
enableToggle:toggle !== false,
scope: editor,
handler:handler||editor.relayBtnCmd,
clickEvent: 'mousedown',
tooltip: tipsEnabled ? editor.buttonTips[id] || undef : undef,
overflowText: editor.buttonTips[id].title || undef,
tabIndex: -1
};
}
if (me.enableFont && !Ext.isSafari2) {
fontSelectItem = Ext.widget('component', {
renderTpl: [
'<select id="{id}-selectEl" class="{cls}">',
'<tpl for="fonts">',
'<option value="{[values.toLowerCase()]}" style="font-family:{.}"<tpl if="values.toLowerCase()==parent.defaultFont"> selected</tpl>>{.}</option>',
'</tpl>',
'</select>'
],
renderData: {
cls: baseCSSPrefix + 'font-select',
fonts: me.fontFamilies,
defaultFont: me.defaultFont
},
childEls: ['selectEl'],
afterRender: function() {
me.fontSelect = this.selectEl;
Ext.Component.prototype.afterRender.apply(this, arguments);
},
onDisable: function() {
var selectEl = this.selectEl;
if (selectEl) {
selectEl.dom.disabled = true;
}
Ext.Component.prototype.onDisable.apply(this, arguments);
},
onEnable: function() {
var selectEl = this.selectEl;
if (selectEl) {
selectEl.dom.disabled = false;
}
Ext.Component.prototype.onEnable.apply(this, arguments);
},
listeners: {
change: function() {
me.relayCmd('fontname', me.fontSelect.dom.value);
me.deferFocus();
},
element: 'selectEl'
}
});
items.push(
fontSelectItem,
'-'
);
}
if (me.enableFormat) {
items.push(
btn('bold'),
btn('italic'),
btn('underline')
);
}
if (me.enableFontSize) {
items.push(
'-',
btn('increasefontsize', false, me.adjustFont),
btn('decreasefontsize', false, me.adjustFont)
);
}
if (me.enableColors) {
items.push(
'-', {
itemId: 'forecolor',
cls: baseCSSPrefix + 'btn-icon',
iconCls: baseCSSPrefix + 'edit-forecolor',
overflowText: editor.buttonTips.forecolor.title,
tooltip: tipsEnabled ? editor.buttonTips.forecolor || undef : undef,
tabIndex:-1,
menu : Ext.widget('menu', {
plain: true,
items: [{
xtype: 'colorpicker',
allowReselect: true,
focus: Ext.emptyFn,
value: '000000',
plain: true,
clickEvent: 'mousedown',
handler: function(cp, color) {
me.execCmd('forecolor', Ext.isWebKit || Ext.isIE ? '#'+color : color);
me.deferFocus();
this.up('menu').hide();
}
}]
})
}, {
itemId: 'backcolor',
cls: baseCSSPrefix + 'btn-icon',
iconCls: baseCSSPrefix + 'edit-backcolor',
overflowText: editor.buttonTips.backcolor.title,
tooltip: tipsEnabled ? editor.buttonTips.backcolor || undef : undef,
tabIndex:-1,
menu : Ext.widget('menu', {
plain: true,
items: [{
xtype: 'colorpicker',
focus: Ext.emptyFn,
value: 'FFFFFF',
plain: true,
allowReselect: true,
clickEvent: 'mousedown',
handler: function(cp, color) {
if (Ext.isGecko) {
me.execCmd('useCSS', false);
me.execCmd('hilitecolor', color);
me.execCmd('useCSS', true);
me.deferFocus();
} else {
me.execCmd(Ext.isOpera ? 'hilitecolor' : 'backcolor', Ext.isWebKit || Ext.isIE ? '#'+color : color);
me.deferFocus();
}
this.up('menu').hide();
}
}]
})
}
);
}
if (me.enableAlignments) {
items.push(
'-',
btn('justifyleft'),
btn('justifycenter'),
btn('justifyright')
);
}
if (!Ext.isSafari2) {
if (me.enableLinks) {
items.push(
'-',
btn('createlink', false, me.createLink)
);
}
if (me.enableLists) {
items.push(
'-',
btn('insertorderedlist'),
btn('insertunorderedlist')
);
}
if (me.enableSourceEdit) {
items.push(
'-',
btn('sourceedit', true, function(btn){
me.toggleSourceEdit(!me.sourceEditMode);
})
);
}
}
// Everything starts disabled.
for (i = 0; i < items.length; i++) {
if (items[i].itemId !== 'sourceedit') {
items[i].disabled = true;
}
}
// build the toolbar
// Automatically rendered in AbstractComponent.afterRender's renderChildren call
toolbar = Ext.widget('toolbar', {
id: me.id + '-toolbar',
ownerCt: me,
cls: Ext.baseCSSPrefix + 'html-editor-tb',
enableOverflow: true,
items: items,
ownerLayout: me.getComponentLayout(),
// stop form submits
listeners: {
click: function(e){
e.preventDefault();
},
element: 'el'
}
});
me.toolbar = toolbar;
},
getMaskTarget: function(){
return this.bodyEl;
},
<span id='Ext-form-field-HtmlEditor-method-setReadOnly'> /**
</span> * Sets the read only state of this field.
* @param {Boolean} readOnly Whether the field should be read only.
*/
setReadOnly: function(readOnly) {
var me = this,
textareaEl = me.textareaEl,
iframeEl = me.iframeEl,
body;
me.readOnly = readOnly;
if (textareaEl) {
textareaEl.dom.readOnly = readOnly;
}
if (me.initialized) {
body = me.getEditorBody();
if (Ext.isIE) {
// Hide the iframe while setting contentEditable so it doesn't grab focus
iframeEl.setDisplayed(false);
body.contentEditable = !readOnly;
iframeEl.setDisplayed(true);
} else {
me.setDesignMode(!readOnly);
}
if (body) {
body.style.cursor = readOnly ? 'default' : 'text';
}
me.disableItems(readOnly);
}
},
<span id='Ext-form-field-HtmlEditor-method-getDocMarkup'> /**
</span> * 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.
* Also note that forcing IE7 mode works when the page is loaded normally, but if you are using IE's Web
* Developer Tools to manually set the document mode, that will take precedence and override what this
* code sets by default. This can be confusing when developing, but is not a user-facing issue.
* @protected
*/
getDocMarkup: function() {
var me = this,
h = me.iframeEl.getHeight() - me.iframePad * 2;
return Ext.String.format('<html><head><style type="text/css">body{border:0;margin:0;padding:{0}px;height:{1}px;box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;cursor:text}</style></head><body></body></html>', me.iframePad, h);
},
// private
getEditorBody: function() {
var doc = this.getDoc();
return doc.body || doc.documentElement;
},
// private
getDoc: function() {
return (!Ext.isIE && this.iframeEl.dom.contentDocument) || this.getWin().document;
},
// private
getWin: function() {
return Ext.isIE ? this.iframeEl.dom.contentWindow : window.frames[this.iframeEl.dom.name];
},
// Do the job of a container layout at this point even though we are not a Container.
// TODO: Refactor as a Container.
finishRenderChildren: function () {
this.callParent();
this.toolbar.finishRender();
},
// private
onRender: function() {
var me = this;
me.callParent(arguments);
// The input element is interrogated by the layout to extract height when labelAlign is 'top'
// It must be set, and then switched between the iframe and the textarea
me.inputEl = me.iframeEl;
// Start polling for when the iframe document is ready to be manipulated
me.monitorTask = Ext.TaskManager.start({
run: me.checkDesignMode,
scope: me,
interval: 100
});
},
initRenderTpl: function() {
var me = this;
if (!me.hasOwnProperty('renderTpl')) {
me.renderTpl = me.getTpl('labelableRenderTpl');
}
return me.callParent();
},
initRenderData: function() {
this.beforeSubTpl = '<div class="' + this.editorWrapCls + '">' + Ext.DomHelper.markup(this.toolbar.getRenderTree());
return Ext.applyIf(this.callParent(), this.getLabelableRenderData());
},
getSubTplData: function() {
return {
$comp : this,
cmpId : this.id,
id : this.getInputId(),
textareaCls : Ext.baseCSSPrefix + 'hidden',
value : this.value,
iframeName : Ext.id(),
iframeSrc : Ext.SSL_SECURE_URL,
size : 'height:100px;width:100%'
};
},
getSubTplMarkup: function() {
return this.getTpl('fieldSubTpl').apply(this.getSubTplData());
},
initFrameDoc: function() {
var me = this,
doc, task;
Ext.TaskManager.stop(me.monitorTask);
doc = me.getDoc();
me.win = me.getWin();
doc.open();
doc.write(me.getDocMarkup());
doc.close();
task = { // must defer to wait for browser to be ready
run: function() {
var doc = me.getDoc();
if (doc.body || doc.readyState === 'complete') {
Ext.TaskManager.stop(task);
me.setDesignMode(true);
Ext.defer(me.initEditor, 10, me);
}
},
interval : 10,
duration:10000,
scope: me
};
Ext.TaskManager.start(task);
},
checkDesignMode: function() {
var me = this,
doc = me.getDoc();
if (doc && (!doc.editorInitialized || me.getDesignMode() !== 'on')) {
me.initFrameDoc();
}
},
<span id='Ext-form-field-HtmlEditor-method-setDesignMode'> /**
</span> * @private
* Sets current design mode. To enable, mode can be true or 'on', off otherwise
*/
setDesignMode: function(mode) {
var me = this,
doc = me.getDoc();
if (doc) {
if (me.readOnly) {
mode = false;
}
doc.designMode = (/on|true/i).test(String(mode).toLowerCase()) ?'on':'off';
}
},
// private
getDesignMode: function() {
var doc = this.getDoc();
return !doc ? '' : String(doc.designMode).toLowerCase();
},
disableItems: function(disabled) {
var items = this.getToolbar().items.items,
i,
iLen = items.length,
item;
for (i = 0; i < iLen; i++) {
item = items[i];
if (item.getItemId() !== 'sourceedit') {
item.setDisabled(disabled);
}
}
},
<span id='Ext-form-field-HtmlEditor-method-toggleSourceEdit'> /**
</span> * Toggles the editor between standard and source edit mode.
* @param {Boolean} [sourceEditMode] True for source edit, false for standard
*/
toggleSourceEdit: function(sourceEditMode) {
var me = this,
iframe = me.iframeEl,
textarea = me.textareaEl,
hiddenCls = Ext.baseCSSPrefix + 'hidden',
btn = me.getToolbar().getComponent('sourceedit');
if (!Ext.isBoolean(sourceEditMode)) {
sourceEditMode = !me.sourceEditMode;
}
me.sourceEditMode = sourceEditMode;
if (btn.pressed !== sourceEditMode) {
btn.toggle(sourceEditMode);
}
if (sourceEditMode) {
me.disableItems(true);
me.syncValue();
iframe.addCls(hiddenCls);
textarea.removeCls(hiddenCls);
textarea.dom.removeAttribute('tabIndex');
textarea.focus();
me.inputEl = textarea;
}
else {
if (me.initialized) {
me.disableItems(me.readOnly);
}
me.pushValue();
iframe.removeCls(hiddenCls);
textarea.addCls(hiddenCls);
textarea.dom.setAttribute('tabIndex', -1);
me.deferFocus();
me.inputEl = iframe;
}
me.fireEvent('editmodechange', me, sourceEditMode);
me.updateLayout();
},
// private used internally
createLink : function() {
var url = prompt(this.createLinkText, this.defaultLinkValue);
if (url && url !== 'http:/'+'/') {
this.relayCmd('createlink', url);
}
},
clearInvalid: Ext.emptyFn,
// docs inherit from Field
setValue: function(value) {
var me = this,
textarea = me.textareaEl;
me.mixins.field.setValue.call(me, value);
if (value === null || value === undefined) {
value = '';
}
if (textarea) {
textarea.dom.value = value;
}
me.pushValue();
return this;
},
<span id='Ext-form-field-HtmlEditor-method-cleanHtml'> /**
</span> * If you need/want custom HTML cleanup, this is the method you should override.
* @param {String} html The HTML to be cleaned
* @return {String} The cleaned HTML
* @protected
*/
cleanHtml: function(html) {
html = String(html);
if (Ext.isWebKit) { // strip safari nonsense
html = html.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi, '');
}
/*
* Neat little hack. Strips out all the non-digit characters from the default
* value and compares it to the character code of the first character in the string
* because it can cause encoding issues when posted to the server. We need the
* parseInt here because charCodeAt will return a number.
*/
if (html.charCodeAt(0) === parseInt(this.defaultValue.replace(/\D/g, ''), 10)) {
html = html.substring(1);
}
return html;
},
<span id='Ext-form-field-HtmlEditor-method-syncValue'> /**
</span> * Syncs the contents of the editor iframe with the textarea.
* @protected
*/
syncValue : function(){
var me = this,
body, changed, html, bodyStyle, match;
if (me.initialized) {
body = me.getEditorBody();
html = body.innerHTML;
if (Ext.isWebKit) {
bodyStyle = body.getAttribute('style'); // Safari puts text-align styles on the body element!
match = bodyStyle.match(/text-align:(.*?);/i);
if (match && match[1]) {
html = '<div style="' + match[0] + '">' + html + '</div>';
}
}
html = me.cleanHtml(html);
if (me.fireEvent('beforesync', me, html) !== false) {
if (me.textareaEl.dom.value != html) {
me.textareaEl.dom.value = html;
changed = true;
}
me.fireEvent('sync', me, html);
if (changed) {
// we have to guard this to avoid infinite recursion because getValue
// calls this method...
me.checkChange();
}
}
}
},
//docs inherit from Field
getValue : function() {
var me = this,
value;
if (!me.sourceEditMode) {
me.syncValue();
}
value = me.rendered ? me.textareaEl.dom.value : me.value;
me.value = value;
return value;
},
<span id='Ext-form-field-HtmlEditor-method-pushValue'> /**
</span> * Pushes the value of the textarea into the iframe editor.
* @protected
*/
pushValue: function() {
var me = this,
v;
if(me.initialized){
v = me.textareaEl.dom.value || '';
if (!me.activated && v.length < 1) {
v = me.defaultValue;
}
if (me.fireEvent('beforepush', me, v) !== false) {
me.getEditorBody().innerHTML = v;
if (Ext.isGecko) {
// Gecko hack, see: https://bugzilla.mozilla.org/show_bug.cgi?id=232791#c8
me.setDesignMode(false); //toggle off first
me.setDesignMode(true);
}
me.fireEvent('push', me, v);
}
}
},
// private
deferFocus : function(){
this.focus(false, true);
},
getFocusEl: function() {
var me = this,
win = me.win;
return win && !me.sourceEditMode ? win : me.textareaEl;
},
// private
initEditor : function(){
//Destroying the component during/before initEditor can cause issues.
try {
var me = this,
dbody = me.getEditorBody(),
ss = me.textareaEl.getStyles('font-size', 'font-family', 'background-image', 'background-repeat', 'background-color', 'color'),
doc,
fn;
ss['background-attachment'] = 'fixed'; // w3c
dbody.bgProperties = 'fixed'; // ie
Ext.DomHelper.applyStyles(dbody, ss);
doc = me.getDoc();
if (doc) {
try {
Ext.EventManager.removeAll(doc);
} catch(e) {}
}
/*
* We need to use createDelegate here, because when using buffer, the delayed task is added
* as a property to the function. When the listener is removed, the task is deleted from the function.
* Since onEditorEvent is shared on the prototype, if we have multiple html editors, the first time one of the editors
* is destroyed, it causes the fn to be deleted from the prototype, which causes errors. Essentially, we're just anonymizing the function.
*/
fn = Ext.Function.bind(me.onEditorEvent, me);
Ext.EventManager.on(doc, {
mousedown: fn,
dblclick: fn,
click: fn,
keyup: fn,
buffer:100
});
// These events need to be relayed from the inner document (where they stop
// bubbling) up to the outer document. This has to be done at the DOM level so
// the event reaches listeners on elements like the document body. The effected
// mechanisms that depend on this bubbling behavior are listed to the right
// of the event.
fn = me.onRelayedEvent;
Ext.EventManager.on(doc, {
mousedown: fn, // menu dismisal (MenuManager) and Window onMouseDown (toFront)
mousemove: fn, // window resize drag detection
mouseup: fn, // window resize termination
click: fn, // not sure, but just to be safe
dblclick: fn, // not sure again
scope: me
});
if (Ext.isGecko) {
Ext.EventManager.on(doc, 'keypress', me.applyCommand, me);
}
if (me.fixKeys) {
Ext.EventManager.on(doc, 'keydown', me.fixKeys, me);
}
// We need to be sure we remove all our events from the iframe on unload or we're going to LEAK!
Ext.EventManager.on(window, 'unload', me.beforeDestroy, me);
doc.editorInitialized = true;
me.initialized = true;
me.pushValue();
me.setReadOnly(me.readOnly);
me.fireEvent('initialize', me);
} catch(ex) {
// ignore (why?)
}
},
// private
beforeDestroy : function(){
var me = this,
monitorTask = me.monitorTask,
doc, prop;
if (monitorTask) {
Ext.TaskManager.stop(monitorTask);
}
if (me.rendered) {
try {
doc = me.getDoc();
if (doc) {
// removeAll() doesn't currently know how to handle iframe document,
// so for now we have to wrap it in an Ext.Element using Ext.fly,
// or else IE6/7 will leak big time when the page is refreshed.
// TODO: this may not be needed once we find a more permanent fix.
// see EXTJSIV-5891.
Ext.EventManager.removeAll(Ext.fly(doc));
for (prop in doc) {
if (doc.hasOwnProperty && doc.hasOwnProperty(prop)) {
delete doc[prop];
}
}
}
} catch(e) {
// ignore (why?)
}
Ext.destroyMembers(me, 'toolbar', 'iframeEl', 'textareaEl');
}
me.callParent();
},
// private
onRelayedEvent: function (event) {
// relay event from the iframe's document to the document that owns the iframe...
var iframeEl = this.iframeEl,
iframeXY = iframeEl.getXY(),
eventXY = event.getXY();
// the event from the inner document has XY relative to that document's origin,
// so adjust it to use the origin of the iframe in the outer document:
event.xy = [iframeXY[0] + eventXY[0], iframeXY[1] + eventXY[1]];
event.injectEvent(iframeEl); // blame the iframe for the event...
event.xy = eventXY; // restore the original XY (just for safety)
},
// private
onFirstFocus : function(){
var me = this,
selection, range;
me.activated = true;
me.disableItems(me.readOnly);
if (Ext.isGecko) { // prevent silly gecko errors
me.win.focus();
selection = me.win.getSelection();
if (!selection.focusNode || selection.focusNode.nodeType !== 3) {
range = selection.getRangeAt(0);
range.selectNodeContents(me.getEditorBody());
range.collapse(true);
me.deferFocus();
}
try {
me.execCmd('useCSS', true);
me.execCmd('styleWithCSS', false);
} catch(e) {
// ignore (why?)
}
}
me.fireEvent('activate', me);
},
// private
adjustFont: function(btn) {
var adjust = btn.getItemId() === 'increasefontsize' ? 1 : -1,
size = this.getDoc().queryCommandValue('FontSize') || '2',
isPxSize = Ext.isString(size) && size.indexOf('px') !== -1,
isSafari;
size = parseInt(size, 10);
if (isPxSize) {
// Safari 3 values
// 1 = 10px, 2 = 13px, 3 = 16px, 4 = 18px, 5 = 24px, 6 = 32px
if (size <= 10) {
size = 1 + adjust;
}
else if (size <= 13) {
size = 2 + adjust;
}
else if (size <= 16) {
size = 3 + adjust;
}
else if (size <= 18) {
size = 4 + adjust;
}
else if (size <= 24) {
size = 5 + adjust;
}
else {
size = 6 + adjust;
}
size = Ext.Number.constrain(size, 1, 6);
} else {
isSafari = Ext.isSafari;
if (isSafari) { // safari
adjust *= 2;
}
size = Math.max(1, size + adjust) + (isSafari ? 'px' : 0);
}
this.execCmd('FontSize', size);
},
// private
onEditorEvent: function(e) {
this.updateToolbar();
},
<span id='Ext-form-field-HtmlEditor-method-updateToolbar'> /**
</span> * Triggers a toolbar update by reading the markup state of the current selection in the editor.
* @protected
*/
updateToolbar: function() {
var me = this,
btns, doc, name, fontSelect;
if (me.readOnly) {
return;
}
if (!me.activated) {
me.onFirstFocus();
return;
}
btns = me.getToolbar().items.map;
doc = me.getDoc();
if (me.enableFont && !Ext.isSafari2) {
name = (doc.queryCommandValue('FontName') || me.defaultFont).toLowerCase();
fontSelect = me.fontSelect.dom;
if (name !== fontSelect.value) {
fontSelect.value = name;
}
}
function updateButtons() {
for (var i = 0, l = arguments.length, name; i < l; i++) {
name = arguments[i];
btns[name].toggle(doc.queryCommandState(name));
}
}
if(me.enableFormat){
updateButtons('bold', 'italic', 'underline');
}
if(me.enableAlignments){
updateButtons('justifyleft', 'justifycenter', 'justifyright');
}
if(!Ext.isSafari2 && me.enableLists){
updateButtons('insertorderedlist', 'insertunorderedlist');
}
Ext.menu.Manager.hideAll();
me.syncValue();
},
// private
relayBtnCmd: function(btn) {
this.relayCmd(btn.getItemId());
},
<span id='Ext-form-field-HtmlEditor-method-relayCmd'> /**
</span> * 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.**
* @param {String} cmd The Midas command
* @param {String/Boolean} [value=null] The value to pass to the command
*/
relayCmd: function(cmd, value) {
Ext.defer(function() {
var me = this;
me.focus();
me.execCmd(cmd, value);
me.updateToolbar();
}, 10, this);
},
<span id='Ext-form-field-HtmlEditor-method-execCmd'> /**
</span> * Executes a Midas editor command directly on the editor document. For visual commands, you should use
* {@link #relayCmd} instead. **This should only be called after the editor is initialized.**
* @param {String} cmd The Midas command
* @param {String/Boolean} [value=null] The value to pass to the command
*/
execCmd : function(cmd, value){
var me = this,
doc = me.getDoc(),
undef;
doc.execCommand(cmd, false, value === undef ? null : value);
me.syncValue();
},
// private
applyCommand : function(e){
if (e.ctrlKey) {
var me = this,
c = e.getCharCode(), cmd;
if (c > 0) {
c = String.fromCharCode(c);
switch (c) {
case 'b':
cmd = 'bold';
break;
case 'i':
cmd = 'italic';
break;
case 'u':
cmd = 'underline';
break;
}
if (cmd) {
me.win.focus();
me.execCmd(cmd);
me.deferFocus();
e.preventDefault();
}
}
}
},
<span id='Ext-form-field-HtmlEditor-method-insertAtCursor'> /**
</span> * Inserts the passed text at the current cursor position.
* Note: the editor must be initialized and activated to insert text.
* @param {String} text
*/
insertAtCursor : function(text){
var me = this,
range;
if (me.activated) {
me.win.focus();
if (Ext.isIE) {
range = me.getDoc().selection.createRange();
if (range) {
range.pasteHTML(text);
me.syncValue();
me.deferFocus();
}
}else{
me.execCmd('InsertHTML', text);
me.deferFocus();
}
}
},
// private
fixKeys: (function() { // load time branching for fastest keydown performance
if (Ext.isIE) {
return function(e){
var me = this,
k = e.getKey(),
doc = me.getDoc(),
readOnly = me.readOnly,
range, target;
if (k === e.TAB) {
e.stopEvent();
if (!readOnly) {
range = doc.selection.createRange();
if(range){
range.collapse(true);
range.pasteHTML('&#160;&#160;&#160;&#160;');
me.deferFocus();
}
}
}
else if (k === e.ENTER) {
if (!readOnly) {
range = doc.selection.createRange();
if (range) {
target = range.parentElement();
if(!target || target.tagName.toLowerCase() !== 'li'){
e.stopEvent();
range.pasteHTML('<br />');
range.collapse(false);
range.select();
}
}
}
}
};
}
if (Ext.isOpera) {
return function(e){
var me = this;
if (e.getKey() === e.TAB) {
e.stopEvent();
if (!me.readOnly) {
me.win.focus();
me.execCmd('InsertHTML','&#160;&#160;&#160;&#160;');
me.deferFocus();
}
}
};
}
if (Ext.isWebKit) {
return function(e){
var me = this,
k = e.getKey(),
readOnly = me.readOnly;
if (k === e.TAB) {
e.stopEvent();
if (!readOnly) {
me.execCmd('InsertText','\t');
me.deferFocus();
}
}
else if (k === e.ENTER) {
e.stopEvent();
if (!readOnly) {
me.execCmd('InsertHtml','<br /><br />');
me.deferFocus();
}
}
};
}
return null; // not needed, so null
}()),
<span id='Ext-form-field-HtmlEditor-method-getToolbar'> /**
</span> * Returns the editor's toolbar. **This is only available after the editor has been rendered.**
* @return {Ext.toolbar.Toolbar}
*/
getToolbar : function(){
return this.toolbar;
},
//<locale>
<span id='Ext-form-field-HtmlEditor-property-buttonTips'> /**
</span> * @property {Object} buttonTips
* 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'
* },
* ...
*/
buttonTips : {
bold : {
title: 'Bold (Ctrl+B)',
text: 'Make the selected text bold.',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
italic : {
title: 'Italic (Ctrl+I)',
text: 'Make the selected text italic.',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
underline : {
title: 'Underline (Ctrl+U)',
text: 'Underline the selected text.',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
increasefontsize : {
title: 'Grow Text',
text: 'Increase the font size.',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
decreasefontsize : {
title: 'Shrink Text',
text: 'Decrease the font size.',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
backcolor : {
title: 'Text Highlight Color',
text: 'Change the background color of the selected text.',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
forecolor : {
title: 'Font Color',
text: 'Change the color of the selected text.',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
justifyleft : {
title: 'Align Text Left',
text: 'Align text to the left.',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
justifycenter : {
title: 'Center Text',
text: 'Center text in the editor.',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
justifyright : {
title: 'Align Text Right',
text: 'Align text to the right.',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
insertunorderedlist : {
title: 'Bullet List',
text: 'Start a bulleted list.',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
insertorderedlist : {
title: 'Numbered List',
text: 'Start a numbered list.',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
createlink : {
title: 'Hyperlink',
text: 'Make the selected text a hyperlink.',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
},
sourceedit : {
title: 'Source Edit',
text: 'Switch to source editing mode.',
cls: Ext.baseCSSPrefix + 'html-editor-tip'
}
}
//</locale>
// hide stuff that is not compatible
<span id='Ext-form-field-HtmlEditor-event-blur'> /**
</span> * @event blur
* @private
*/
<span id='Ext-form-field-HtmlEditor-event-focus'> /**
</span> * @event focus
* @private
*/
<span id='Ext-form-field-HtmlEditor-event-specialkey'> /**
</span> * @event specialkey
* @private
*/
<span id='Ext-form-field-HtmlEditor-cfg-fieldCls'> /**
</span> * @cfg {String} fieldCls
* @private
*/
<span id='Ext-form-field-HtmlEditor-cfg-focusCls'> /**
</span> * @cfg {String} focusCls
* @private
*/
<span id='Ext-form-field-HtmlEditor-cfg-autoCreate'> /**
</span> * @cfg {String} autoCreate
* @private
*/
<span id='Ext-form-field-HtmlEditor-cfg-inputType'> /**
</span> * @cfg {String} inputType
* @private
*/
<span id='Ext-form-field-HtmlEditor-cfg-invalidCls'> /**
</span> * @cfg {String} invalidCls
* @private
*/
<span id='Ext-form-field-HtmlEditor-cfg-invalidText'> /**
</span> * @cfg {String} invalidText
* @private
*/
<span id='Ext-form-field-HtmlEditor-cfg-msgFx'> /**
</span> * @cfg {String} msgFx
* @private
*/
<span id='Ext-form-field-HtmlEditor-cfg-allowDomMove'> /**
</span> * @cfg {Boolean} allowDomMove
* @private
*/
<span id='Ext-form-field-HtmlEditor-cfg-applyTo'> /**
</span> * @cfg {String} applyTo
* @private
*/
<span id='Ext-form-field-HtmlEditor-cfg-readOnly'> /**
</span> * @cfg {String} readOnly
* @private
*/
<span id='Ext-form-field-HtmlEditor-cfg-tabIndex'> /**
</span> * @cfg {String} tabIndex
* @private
*/
<span id='Ext-form-field-HtmlEditor-method-validate'> /**
</span> * @method validate
* @private
*/
});
</pre>
</body>
</html>