Web Interface For Lite Argus Control modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1273 lines
42 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <title>The source code</title>
  5. <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  6. <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  7. </head>
  8. <body onload="prettyPrint();">
  9. <pre class="prettyprint lang-js">/*!
  10. * Ext JS Library 3.3.1
  11. * Copyright(c) 2006-2010 Sencha Inc.
  12. * licensing@sencha.com
  13. * http://www.sencha.com/license
  14. */
  15. <div id="cls-Ext.form.HtmlEditor"></div>/**
  16. * @class Ext.form.HtmlEditor
  17. * @extends Ext.form.Field
  18. * Provides a lightweight HTML Editor component. Some toolbar features are not supported by Safari and will be
  19. * automatically hidden when needed. These are noted in the config options where appropriate.
  20. * <br><br>The editor's toolbar buttons have tooltips defined in the {@link #buttonTips} property, but they are not
  21. * enabled by default unless the global {@link Ext.QuickTips} singleton is {@link Ext.QuickTips#init initialized}.
  22. * <br><br><b>Note: The focus/blur and validation marking functionality inherited from Ext.form.Field is NOT
  23. * supported by this editor.</b>
  24. * <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
  25. * any element that has display set to 'none' can cause problems in Safari and Firefox due to their default iframe reloading bugs.
  26. * <br><br>Example usage:
  27. * <pre><code>
  28. // Simple example rendered with default options:
  29. Ext.QuickTips.init(); // enable tooltips
  30. new Ext.form.HtmlEditor({
  31. renderTo: Ext.getBody(),
  32. width: 800,
  33. height: 300
  34. });
  35. // Passed via xtype into a container and with custom options:
  36. Ext.QuickTips.init(); // enable tooltips
  37. new Ext.Panel({
  38. title: 'HTML Editor',
  39. renderTo: Ext.getBody(),
  40. width: 600,
  41. height: 300,
  42. frame: true,
  43. layout: 'fit',
  44. items: {
  45. xtype: 'htmleditor',
  46. enableColors: false,
  47. enableAlignments: false
  48. }
  49. });
  50. </code></pre>
  51. * @constructor
  52. * Create a new HtmlEditor
  53. * @param {Object} config
  54. * @xtype htmleditor
  55. */
  56. Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
  57. <div id="cfg-Ext.form.HtmlEditor-enableFormat"></div>/**
  58. * @cfg {Boolean} enableFormat Enable the bold, italic and underline buttons (defaults to true)
  59. */
  60. enableFormat : true,
  61. <div id="cfg-Ext.form.HtmlEditor-enableFontSize"></div>/**
  62. * @cfg {Boolean} enableFontSize Enable the increase/decrease font size buttons (defaults to true)
  63. */
  64. enableFontSize : true,
  65. <div id="cfg-Ext.form.HtmlEditor-enableColors"></div>/**
  66. * @cfg {Boolean} enableColors Enable the fore/highlight color buttons (defaults to true)
  67. */
  68. enableColors : true,
  69. <div id="cfg-Ext.form.HtmlEditor-enableAlignments"></div>/**
  70. * @cfg {Boolean} enableAlignments Enable the left, center, right alignment buttons (defaults to true)
  71. */
  72. enableAlignments : true,
  73. <div id="cfg-Ext.form.HtmlEditor-enableLists"></div>/**
  74. * @cfg {Boolean} enableLists Enable the bullet and numbered list buttons. Not available in Safari. (defaults to true)
  75. */
  76. enableLists : true,
  77. <div id="cfg-Ext.form.HtmlEditor-enableSourceEdit"></div>/**
  78. * @cfg {Boolean} enableSourceEdit Enable the switch to source edit button. Not available in Safari. (defaults to true)
  79. */
  80. enableSourceEdit : true,
  81. <div id="cfg-Ext.form.HtmlEditor-enableLinks"></div>/**
  82. * @cfg {Boolean} enableLinks Enable the create link button. Not available in Safari. (defaults to true)
  83. */
  84. enableLinks : true,
  85. <div id="cfg-Ext.form.HtmlEditor-enableFont"></div>/**
  86. * @cfg {Boolean} enableFont Enable font selection. Not available in Safari. (defaults to true)
  87. */
  88. enableFont : true,
  89. <div id="cfg-Ext.form.HtmlEditor-createLinkText"></div>/**
  90. * @cfg {String} createLinkText The default text for the create link prompt
  91. */
  92. createLinkText : 'Please enter the URL for the link:',
  93. <div id="cfg-Ext.form.HtmlEditor-defaultLinkValue"></div>/**
  94. * @cfg {String} defaultLinkValue The default value for the create link prompt (defaults to http:/ /)
  95. */
  96. defaultLinkValue : 'http:/'+'/',
  97. <div id="cfg-Ext.form.HtmlEditor-fontFamilies"></div>/**
  98. * @cfg {Array} fontFamilies An array of available font families
  99. */
  100. fontFamilies : [
  101. 'Arial',
  102. 'Courier New',
  103. 'Tahoma',
  104. 'Times New Roman',
  105. 'Verdana'
  106. ],
  107. defaultFont: 'tahoma',
  108. <div id="cfg-Ext.form.HtmlEditor-defaultValue"></div>/**
  109. * @cfg {String} defaultValue A default value to be put into the editor to resolve focus issues (defaults to &#160; (Non-breaking space) in Opera and IE6, &#8203; (Zero-width space) in all other browsers).
  110. */
  111. defaultValue: (Ext.isOpera || Ext.isIE6) ? '&#160;' : '&#8203;',
  112. // private properties
  113. actionMode: 'wrap',
  114. validationEvent : false,
  115. deferHeight: true,
  116. initialized : false,
  117. activated : false,
  118. sourceEditMode : false,
  119. onFocus : Ext.emptyFn,
  120. iframePad:3,
  121. hideMode:'offsets',
  122. defaultAutoCreate : {
  123. tag: "textarea",
  124. style:"width:500px;height:300px;",
  125. autocomplete: "off"
  126. },
  127. // private
  128. initComponent : function(){
  129. this.addEvents(
  130. <div id="event-Ext.form.HtmlEditor-initialize"></div>/**
  131. * @event initialize
  132. * Fires when the editor is fully initialized (including the iframe)
  133. * @param {HtmlEditor} this
  134. */
  135. 'initialize',
  136. <div id="event-Ext.form.HtmlEditor-activate"></div>/**
  137. * @event activate
  138. * Fires when the editor is first receives the focus. Any insertion must wait
  139. * until after this event.
  140. * @param {HtmlEditor} this
  141. */
  142. 'activate',
  143. <div id="event-Ext.form.HtmlEditor-beforesync"></div>/**
  144. * @event beforesync
  145. * Fires before the textarea is updated with content from the editor iframe. Return false
  146. * to cancel the sync.
  147. * @param {HtmlEditor} this
  148. * @param {String} html
  149. */
  150. 'beforesync',
  151. <div id="event-Ext.form.HtmlEditor-beforepush"></div>/**
  152. * @event beforepush
  153. * Fires before the iframe editor is updated with content from the textarea. Return false
  154. * to cancel the push.
  155. * @param {HtmlEditor} this
  156. * @param {String} html
  157. */
  158. 'beforepush',
  159. <div id="event-Ext.form.HtmlEditor-sync"></div>/**
  160. * @event sync
  161. * Fires when the textarea is updated with content from the editor iframe.
  162. * @param {HtmlEditor} this
  163. * @param {String} html
  164. */
  165. 'sync',
  166. <div id="event-Ext.form.HtmlEditor-push"></div>/**
  167. * @event push
  168. * Fires when the iframe editor is updated with content from the textarea.
  169. * @param {HtmlEditor} this
  170. * @param {String} html
  171. */
  172. 'push',
  173. <div id="event-Ext.form.HtmlEditor-editmodechange"></div>/**
  174. * @event editmodechange
  175. * Fires when the editor switches edit modes
  176. * @param {HtmlEditor} this
  177. * @param {Boolean} sourceEdit True if source edit, false if standard editing.
  178. */
  179. 'editmodechange'
  180. );
  181. Ext.form.HtmlEditor.superclass.initComponent.call(this);
  182. },
  183. // private
  184. createFontOptions : function(){
  185. var buf = [], fs = this.fontFamilies, ff, lc;
  186. for(var i = 0, len = fs.length; i< len; i++){
  187. ff = fs[i];
  188. lc = ff.toLowerCase();
  189. buf.push(
  190. '<option value="',lc,'" style="font-family:',ff,';"',
  191. (this.defaultFont == lc ? ' selected="true">' : '>'),
  192. ff,
  193. '</option>'
  194. );
  195. }
  196. return buf.join('');
  197. },
  198. /*
  199. * Protected method that will not generally be called directly. It
  200. * is called when the editor creates its toolbar. Override this method if you need to
  201. * add custom toolbar buttons.
  202. * @param {HtmlEditor} editor
  203. */
  204. createToolbar : function(editor){
  205. var items = [];
  206. var tipsEnabled = Ext.QuickTips && Ext.QuickTips.isEnabled();
  207. function btn(id, toggle, handler){
  208. return {
  209. itemId : id,
  210. cls : 'x-btn-icon',
  211. iconCls: 'x-edit-'+id,
  212. enableToggle:toggle !== false,
  213. scope: editor,
  214. handler:handler||editor.relayBtnCmd,
  215. clickEvent:'mousedown',
  216. tooltip: tipsEnabled ? editor.buttonTips[id] || undefined : undefined,
  217. overflowText: editor.buttonTips[id].title || undefined,
  218. tabIndex:-1
  219. };
  220. }
  221. if(this.enableFont && !Ext.isSafari2){
  222. var fontSelectItem = new Ext.Toolbar.Item({
  223. autoEl: {
  224. tag:'select',
  225. cls:'x-font-select',
  226. html: this.createFontOptions()
  227. }
  228. });
  229. items.push(
  230. fontSelectItem,
  231. '-'
  232. );
  233. }
  234. if(this.enableFormat){
  235. items.push(
  236. btn('bold'),
  237. btn('italic'),
  238. btn('underline')
  239. );
  240. }
  241. if(this.enableFontSize){
  242. items.push(
  243. '-',
  244. btn('increasefontsize', false, this.adjustFont),
  245. btn('decreasefontsize', false, this.adjustFont)
  246. );
  247. }
  248. if(this.enableColors){
  249. items.push(
  250. '-', {
  251. itemId:'forecolor',
  252. cls:'x-btn-icon',
  253. iconCls: 'x-edit-forecolor',
  254. clickEvent:'mousedown',
  255. tooltip: tipsEnabled ? editor.buttonTips.forecolor || undefined : undefined,
  256. tabIndex:-1,
  257. menu : new Ext.menu.ColorMenu({
  258. allowReselect: true,
  259. focus: Ext.emptyFn,
  260. value:'000000',
  261. plain:true,
  262. listeners: {
  263. scope: this,
  264. select: function(cp, color){
  265. this.execCmd('forecolor', Ext.isWebKit || Ext.isIE ? '#'+color : color);
  266. this.deferFocus();
  267. }
  268. },
  269. clickEvent:'mousedown'
  270. })
  271. }, {
  272. itemId:'backcolor',
  273. cls:'x-btn-icon',
  274. iconCls: 'x-edit-backcolor',
  275. clickEvent:'mousedown',
  276. tooltip: tipsEnabled ? editor.buttonTips.backcolor || undefined : undefined,
  277. tabIndex:-1,
  278. menu : new Ext.menu.ColorMenu({
  279. focus: Ext.emptyFn,
  280. value:'FFFFFF',
  281. plain:true,
  282. allowReselect: true,
  283. listeners: {
  284. scope: this,
  285. select: function(cp, color){
  286. if(Ext.isGecko){
  287. this.execCmd('useCSS', false);
  288. this.execCmd('hilitecolor', color);
  289. this.execCmd('useCSS', true);
  290. this.deferFocus();
  291. }else{
  292. this.execCmd(Ext.isOpera ? 'hilitecolor' : 'backcolor', Ext.isWebKit || Ext.isIE ? '#'+color : color);
  293. this.deferFocus();
  294. }
  295. }
  296. },
  297. clickEvent:'mousedown'
  298. })
  299. }
  300. );
  301. }
  302. if(this.enableAlignments){
  303. items.push(
  304. '-',
  305. btn('justifyleft'),
  306. btn('justifycenter'),
  307. btn('justifyright')
  308. );
  309. }
  310. if(!Ext.isSafari2){
  311. if(this.enableLinks){
  312. items.push(
  313. '-',
  314. btn('createlink', false, this.createLink)
  315. );
  316. }
  317. if(this.enableLists){
  318. items.push(
  319. '-',
  320. btn('insertorderedlist'),
  321. btn('insertunorderedlist')
  322. );
  323. }
  324. if(this.enableSourceEdit){
  325. items.push(
  326. '-',
  327. btn('sourceedit', true, function(btn){
  328. this.toggleSourceEdit(!this.sourceEditMode);
  329. })
  330. );
  331. }
  332. }
  333. // build the toolbar
  334. var tb = new Ext.Toolbar({
  335. renderTo: this.wrap.dom.firstChild,
  336. items: items
  337. });
  338. if (fontSelectItem) {
  339. this.fontSelect = fontSelectItem.el;
  340. this.mon(this.fontSelect, 'change', function(){
  341. var font = this.fontSelect.dom.value;
  342. this.relayCmd('fontname', font);
  343. this.deferFocus();
  344. }, this);
  345. }
  346. // stop form submits
  347. this.mon(tb.el, 'click', function(e){
  348. e.preventDefault();
  349. });
  350. this.tb = tb;
  351. this.tb.doLayout();
  352. },
  353. onDisable: function(){
  354. this.wrap.mask();
  355. Ext.form.HtmlEditor.superclass.onDisable.call(this);
  356. },
  357. onEnable: function(){
  358. this.wrap.unmask();
  359. Ext.form.HtmlEditor.superclass.onEnable.call(this);
  360. },
  361. setReadOnly: function(readOnly){
  362. Ext.form.HtmlEditor.superclass.setReadOnly.call(this, readOnly);
  363. if(this.initialized){
  364. if(Ext.isIE){
  365. this.getEditorBody().contentEditable = !readOnly;
  366. }else{
  367. this.setDesignMode(!readOnly);
  368. }
  369. var bd = this.getEditorBody();
  370. if(bd){
  371. bd.style.cursor = this.readOnly ? 'default' : 'text';
  372. }
  373. this.disableItems(readOnly);
  374. }
  375. },
  376. <div id="method-Ext.form.HtmlEditor-getDocMarkup"></div>/**
  377. * Protected method that will not generally be called directly. It
  378. * is called when the editor initializes the iframe with HTML contents. Override this method if you
  379. * want to change the initialization markup of the iframe (e.g. to add stylesheets).
  380. *
  381. * Note: IE8-Standards has unwanted scroller behavior, so the default meta tag forces IE7 compatibility
  382. */
  383. getDocMarkup : function(){
  384. var h = Ext.fly(this.iframe).getHeight() - this.iframePad * 2;
  385. return String.format('<html><head><style type="text/css">body{border: 0; margin: 0; padding: {0}px; height: {1}px; cursor: text}</style></head><body></body></html>', this.iframePad, h);
  386. },
  387. // private
  388. getEditorBody : function(){
  389. var doc = this.getDoc();
  390. return doc.body || doc.documentElement;
  391. },
  392. // private
  393. getDoc : function(){
  394. return Ext.isIE ? this.getWin().document : (this.iframe.contentDocument || this.getWin().document);
  395. },
  396. // private
  397. getWin : function(){
  398. return Ext.isIE ? this.iframe.contentWindow : window.frames[this.iframe.name];
  399. },
  400. // private
  401. onRender : function(ct, position){
  402. Ext.form.HtmlEditor.superclass.onRender.call(this, ct, position);
  403. this.el.dom.style.border = '0 none';
  404. this.el.dom.setAttribute('tabIndex', -1);
  405. this.el.addClass('x-hidden');
  406. if(Ext.isIE){ // fix IE 1px bogus margin
  407. this.el.applyStyles('margin-top:-1px;margin-bottom:-1px;');
  408. }
  409. this.wrap = this.el.wrap({
  410. cls:'x-html-editor-wrap', cn:{cls:'x-html-editor-tb'}
  411. });
  412. this.createToolbar(this);
  413. this.disableItems(true);
  414. this.tb.doLayout();
  415. this.createIFrame();
  416. if(!this.width){
  417. var sz = this.el.getSize();
  418. this.setSize(sz.width, this.height || sz.height);
  419. }
  420. this.resizeEl = this.positionEl = this.wrap;
  421. },
  422. createIFrame: function(){
  423. var iframe = document.createElement('iframe');
  424. iframe.name = Ext.id();
  425. iframe.frameBorder = '0';
  426. iframe.style.overflow = 'auto';
  427. iframe.src = Ext.SSL_SECURE_URL;
  428. this.wrap.dom.appendChild(iframe);
  429. this.iframe = iframe;
  430. this.monitorTask = Ext.TaskMgr.start({
  431. run: this.checkDesignMode,
  432. scope: this,
  433. interval:100
  434. });
  435. },
  436. initFrame : function(){
  437. Ext.TaskMgr.stop(this.monitorTask);
  438. var doc = this.getDoc();
  439. this.win = this.getWin();
  440. doc.open();
  441. doc.write(this.getDocMarkup());
  442. doc.close();
  443. var task = { // must defer to wait for browser to be ready
  444. run : function(){
  445. var doc = this.getDoc();
  446. if(doc.body || doc.readyState == 'complete'){
  447. Ext.TaskMgr.stop(task);
  448. this.setDesignMode(true);
  449. this.initEditor.defer(10, this);
  450. }
  451. },
  452. interval : 10,
  453. duration:10000,
  454. scope: this
  455. };
  456. Ext.TaskMgr.start(task);
  457. },
  458. checkDesignMode : function(){
  459. if(this.wrap && this.wrap.dom.offsetWidth){
  460. var doc = this.getDoc();
  461. if(!doc){
  462. return;
  463. }
  464. if(!doc.editorInitialized || this.getDesignMode() != 'on'){
  465. this.initFrame();
  466. }
  467. }
  468. },
  469. /* private
  470. * set current design mode. To enable, mode can be true or 'on', off otherwise
  471. */
  472. setDesignMode : function(mode){
  473. var doc = this.getDoc();
  474. if (doc) {
  475. if(this.readOnly){
  476. mode = false;
  477. }
  478. doc.designMode = (/on|true/i).test(String(mode).toLowerCase()) ?'on':'off';
  479. }
  480. },
  481. // private
  482. getDesignMode : function(){
  483. var doc = this.getDoc();
  484. if(!doc){ return ''; }
  485. return String(doc.designMode).toLowerCase();
  486. },
  487. disableItems: function(disabled){
  488. if(this.fontSelect){
  489. this.fontSelect.dom.disabled = disabled;
  490. }
  491. this.tb.items.each(function(item){
  492. if(item.getItemId() != 'sourceedit'){
  493. item.setDisabled(disabled);
  494. }
  495. });
  496. },
  497. // private
  498. onResize : function(w, h){
  499. Ext.form.HtmlEditor.superclass.onResize.apply(this, arguments);
  500. if(this.el && this.iframe){
  501. if(Ext.isNumber(w)){
  502. var aw = w - this.wrap.getFrameWidth('lr');
  503. this.el.setWidth(aw);
  504. this.tb.setWidth(aw);
  505. this.iframe.style.width = Math.max(aw, 0) + 'px';
  506. }
  507. if(Ext.isNumber(h)){
  508. var ah = h - this.wrap.getFrameWidth('tb') - this.tb.el.getHeight();
  509. this.el.setHeight(ah);
  510. this.iframe.style.height = Math.max(ah, 0) + 'px';
  511. var bd = this.getEditorBody();
  512. if(bd){
  513. bd.style.height = Math.max((ah - (this.iframePad*2)), 0) + 'px';
  514. }
  515. }
  516. }
  517. },
  518. <div id="method-Ext.form.HtmlEditor-toggleSourceEdit"></div>/**
  519. * Toggles the editor between standard and source edit mode.
  520. * @param {Boolean} sourceEdit (optional) True for source edit, false for standard
  521. */
  522. toggleSourceEdit : function(sourceEditMode){
  523. var iframeHeight,
  524. elHeight;
  525. if (sourceEditMode === undefined) {
  526. sourceEditMode = !this.sourceEditMode;
  527. }
  528. this.sourceEditMode = sourceEditMode === true;
  529. var btn = this.tb.getComponent('sourceedit');
  530. if (btn.pressed !== this.sourceEditMode) {
  531. btn.toggle(this.sourceEditMode);
  532. if (!btn.xtbHidden) {
  533. return;
  534. }
  535. }
  536. if (this.sourceEditMode) {
  537. // grab the height of the containing panel before we hide the iframe
  538. this.previousSize = this.getSize();
  539. iframeHeight = Ext.get(this.iframe).getHeight();
  540. this.disableItems(true);
  541. this.syncValue();
  542. this.iframe.className = 'x-hidden';
  543. this.el.removeClass('x-hidden');
  544. this.el.dom.removeAttribute('tabIndex');
  545. this.el.focus();
  546. this.el.dom.style.height = iframeHeight + 'px';
  547. }
  548. else {
  549. elHeight = parseInt(this.el.dom.style.height, 10);
  550. if (this.initialized) {
  551. this.disableItems(this.readOnly);
  552. }
  553. this.pushValue();
  554. this.iframe.className = '';
  555. this.el.addClass('x-hidden');
  556. this.el.dom.setAttribute('tabIndex', -1);
  557. this.deferFocus();
  558. this.setSize(this.previousSize);
  559. delete this.previousSize;
  560. this.iframe.style.height = elHeight + 'px';
  561. }
  562. this.fireEvent('editmodechange', this, this.sourceEditMode);
  563. },
  564. // private used internally
  565. createLink : function() {
  566. var url = prompt(this.createLinkText, this.defaultLinkValue);
  567. if(url && url != 'http:/'+'/'){
  568. this.relayCmd('createlink', url);
  569. }
  570. },
  571. // private
  572. initEvents : function(){
  573. this.originalValue = this.getValue();
  574. },
  575. <div id="method-Ext.form.HtmlEditor-markInvalid"></div>/**
  576. * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
  577. * @method
  578. */
  579. markInvalid : Ext.emptyFn,
  580. <div id="method-Ext.form.HtmlEditor-clearInvalid"></div>/**
  581. * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide
  582. * @method
  583. */
  584. clearInvalid : Ext.emptyFn,
  585. // docs inherit from Field
  586. setValue : function(v){
  587. Ext.form.HtmlEditor.superclass.setValue.call(this, v);
  588. this.pushValue();
  589. return this;
  590. },
  591. <div id="method-Ext.form.HtmlEditor-cleanHtml"></div>/**
  592. * Protected method that will not generally be called directly. If you need/want
  593. * custom HTML cleanup, this is the method you should override.
  594. * @param {String} html The HTML to be cleaned
  595. * @return {String} The cleaned HTML
  596. */
  597. cleanHtml: function(html) {
  598. html = String(html);
  599. if(Ext.isWebKit){ // strip safari nonsense
  600. html = html.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi, '');
  601. }
  602. /*
  603. * Neat little hack. Strips out all the non-digit characters from the default
  604. * value and compares it to the character code of the first character in the string
  605. * because it can cause encoding issues when posted to the server.
  606. */
  607. if(html.charCodeAt(0) == this.defaultValue.replace(/\D/g, '')){
  608. html = html.substring(1);
  609. }
  610. return html;
  611. },
  612. <div id="method-Ext.form.HtmlEditor-syncValue"></div>/**
  613. * Protected method that will not generally be called directly. Syncs the contents
  614. * of the editor iframe with the textarea.
  615. */
  616. syncValue : function(){
  617. if(this.initialized){
  618. var bd = this.getEditorBody();
  619. var html = bd.innerHTML;
  620. if(Ext.isWebKit){
  621. var bs = bd.getAttribute('style'); // Safari puts text-align styles on the body element!
  622. var m = bs.match(/text-align:(.*?);/i);
  623. if(m && m[1]){
  624. html = '<div style="'+m[0]+'">' + html + '</div>';
  625. }
  626. }
  627. html = this.cleanHtml(html);
  628. if(this.fireEvent('beforesync', this, html) !== false){
  629. this.el.dom.value = html;
  630. this.fireEvent('sync', this, html);
  631. }
  632. }
  633. },
  634. //docs inherit from Field
  635. getValue : function() {
  636. this[this.sourceEditMode ? 'pushValue' : 'syncValue']();
  637. return Ext.form.HtmlEditor.superclass.getValue.call(this);
  638. },
  639. <div id="method-Ext.form.HtmlEditor-pushValue"></div>/**
  640. * Protected method that will not generally be called directly. Pushes the value of the textarea
  641. * into the iframe editor.
  642. */
  643. pushValue : function(){
  644. if(this.initialized){
  645. var v = this.el.dom.value;
  646. if(!this.activated && v.length < 1){
  647. v = this.defaultValue;
  648. }
  649. if(this.fireEvent('beforepush', this, v) !== false){
  650. this.getEditorBody().innerHTML = v;
  651. if(Ext.isGecko){
  652. // Gecko hack, see: https://bugzilla.mozilla.org/show_bug.cgi?id=232791#c8
  653. this.setDesignMode(false); //toggle off first
  654. this.setDesignMode(true);
  655. }
  656. this.fireEvent('push', this, v);
  657. }
  658. }
  659. },
  660. // private
  661. deferFocus : function(){
  662. this.focus.defer(10, this);
  663. },
  664. // docs inherit from Field
  665. focus : function(){
  666. if(this.win && !this.sourceEditMode){
  667. this.win.focus();
  668. }else{
  669. this.el.focus();
  670. }
  671. },
  672. // private
  673. initEditor : function(){
  674. //Destroying the component during/before initEditor can cause issues.
  675. try{
  676. var dbody = this.getEditorBody(),
  677. ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat', 'background-color', 'color'),
  678. doc,
  679. fn;
  680. ss['background-attachment'] = 'fixed'; // w3c
  681. dbody.bgProperties = 'fixed'; // ie
  682. Ext.DomHelper.applyStyles(dbody, ss);
  683. doc = this.getDoc();
  684. if(doc){
  685. try{
  686. Ext.EventManager.removeAll(doc);
  687. }catch(e){}
  688. }
  689. /*
  690. * We need to use createDelegate here, because when using buffer, the delayed task is added
  691. * as a property to the function. When the listener is removed, the task is deleted from the function.
  692. * Since onEditorEvent is shared on the prototype, if we have multiple html editors, the first time one of the editors
  693. * is destroyed, it causes the fn to be deleted from the prototype, which causes errors. Essentially, we're just anonymizing the function.
  694. */
  695. fn = this.onEditorEvent.createDelegate(this);
  696. Ext.EventManager.on(doc, {
  697. mousedown: fn,
  698. dblclick: fn,
  699. click: fn,
  700. keyup: fn,
  701. buffer:100
  702. });
  703. if(Ext.isGecko){
  704. Ext.EventManager.on(doc, 'keypress', this.applyCommand, this);
  705. }
  706. if(Ext.isIE || Ext.isWebKit || Ext.isOpera){
  707. Ext.EventManager.on(doc, 'keydown', this.fixKeys, this);
  708. }
  709. doc.editorInitialized = true;
  710. this.initialized = true;
  711. this.pushValue();
  712. this.setReadOnly(this.readOnly);
  713. this.fireEvent('initialize', this);
  714. }catch(e){}
  715. },
  716. // private
  717. beforeDestroy : function(){
  718. if(this.monitorTask){
  719. Ext.TaskMgr.stop(this.monitorTask);
  720. }
  721. if(this.rendered){
  722. Ext.destroy(this.tb);
  723. var doc = this.getDoc();
  724. if(doc){
  725. try{
  726. Ext.EventManager.removeAll(doc);
  727. for (var prop in doc){
  728. delete doc[prop];
  729. }
  730. }catch(e){}
  731. }
  732. if(this.wrap){
  733. this.wrap.dom.innerHTML = '';
  734. this.wrap.remove();
  735. }
  736. }
  737. Ext.form.HtmlEditor.superclass.beforeDestroy.call(this);
  738. },
  739. // private
  740. onFirstFocus : function(){
  741. this.activated = true;
  742. this.disableItems(this.readOnly);
  743. if(Ext.isGecko){ // prevent silly gecko errors
  744. this.win.focus();
  745. var s = this.win.getSelection();
  746. if(!s.focusNode || s.focusNode.nodeType != 3){
  747. var r = s.getRangeAt(0);
  748. r.selectNodeContents(this.getEditorBody());
  749. r.collapse(true);
  750. this.deferFocus();
  751. }
  752. try{
  753. this.execCmd('useCSS', true);
  754. this.execCmd('styleWithCSS', false);
  755. }catch(e){}
  756. }
  757. this.fireEvent('activate', this);
  758. },
  759. // private
  760. adjustFont: function(btn){
  761. var adjust = btn.getItemId() == 'increasefontsize' ? 1 : -1,
  762. doc = this.getDoc(),
  763. v = parseInt(doc.queryCommandValue('FontSize') || 2, 10);
  764. if((Ext.isSafari && !Ext.isSafari2) || Ext.isChrome || Ext.isAir){
  765. // Safari 3 values
  766. // 1 = 10px, 2 = 13px, 3 = 16px, 4 = 18px, 5 = 24px, 6 = 32px
  767. if(v <= 10){
  768. v = 1 + adjust;
  769. }else if(v <= 13){
  770. v = 2 + adjust;
  771. }else if(v <= 16){
  772. v = 3 + adjust;
  773. }else if(v <= 18){
  774. v = 4 + adjust;
  775. }else if(v <= 24){
  776. v = 5 + adjust;
  777. }else {
  778. v = 6 + adjust;
  779. }
  780. v = v.constrain(1, 6);
  781. }else{
  782. if(Ext.isSafari){ // safari
  783. adjust *= 2;
  784. }
  785. v = Math.max(1, v+adjust) + (Ext.isSafari ? 'px' : 0);
  786. }
  787. this.execCmd('FontSize', v);
  788. },
  789. // private
  790. onEditorEvent : function(e){
  791. this.updateToolbar();
  792. },
  793. <div id="method-Ext.form.HtmlEditor-updateToolbar"></div>/**
  794. * Protected method that will not generally be called directly. It triggers
  795. * a toolbar update by reading the markup state of the current selection in the editor.
  796. */
  797. updateToolbar: function(){
  798. if(this.readOnly){
  799. return;
  800. }
  801. if(!this.activated){
  802. this.onFirstFocus();
  803. return;
  804. }
  805. var btns = this.tb.items.map,
  806. doc = this.getDoc();
  807. if(this.enableFont && !Ext.isSafari2){
  808. var name = (doc.queryCommandValue('FontName')||this.defaultFont).toLowerCase();
  809. if(name != this.fontSelect.dom.value){
  810. this.fontSelect.dom.value = name;
  811. }
  812. }
  813. if(this.enableFormat){
  814. btns.bold.toggle(doc.queryCommandState('bold'));
  815. btns.italic.toggle(doc.queryCommandState('italic'));
  816. btns.underline.toggle(doc.queryCommandState('underline'));
  817. }
  818. if(this.enableAlignments){
  819. btns.justifyleft.toggle(doc.queryCommandState('justifyleft'));
  820. btns.justifycenter.toggle(doc.queryCommandState('justifycenter'));
  821. btns.justifyright.toggle(doc.queryCommandState('justifyright'));
  822. }
  823. if(!Ext.isSafari2 && this.enableLists){
  824. btns.insertorderedlist.toggle(doc.queryCommandState('insertorderedlist'));
  825. btns.insertunorderedlist.toggle(doc.queryCommandState('insertunorderedlist'));
  826. }
  827. Ext.menu.MenuMgr.hideAll();
  828. this.syncValue();
  829. },
  830. // private
  831. relayBtnCmd : function(btn){
  832. this.relayCmd(btn.getItemId());
  833. },
  834. <div id="method-Ext.form.HtmlEditor-relayCmd"></div>/**
  835. * Executes a Midas editor command on the editor document and performs necessary focus and
  836. * toolbar updates. <b>This should only be called after the editor is initialized.</b>
  837. * @param {String} cmd The Midas command
  838. * @param {String/Boolean} value (optional) The value to pass to the command (defaults to null)
  839. */
  840. relayCmd : function(cmd, value){
  841. (function(){
  842. this.focus();
  843. this.execCmd(cmd, value);
  844. this.updateToolbar();
  845. }).defer(10, this);
  846. },
  847. <div id="method-Ext.form.HtmlEditor-execCmd"></div>/**
  848. * Executes a Midas editor command directly on the editor document.
  849. * For visual commands, you should use {@link #relayCmd} instead.
  850. * <b>This should only be called after the editor is initialized.</b>
  851. * @param {String} cmd The Midas command
  852. * @param {String/Boolean} value (optional) The value to pass to the command (defaults to null)
  853. */
  854. execCmd : function(cmd, value){
  855. var doc = this.getDoc();
  856. doc.execCommand(cmd, false, value === undefined ? null : value);
  857. this.syncValue();
  858. },
  859. // private
  860. applyCommand : function(e){
  861. if(e.ctrlKey){
  862. var c = e.getCharCode(), cmd;
  863. if(c > 0){
  864. c = String.fromCharCode(c);
  865. switch(c){
  866. case 'b':
  867. cmd = 'bold';
  868. break;
  869. case 'i':
  870. cmd = 'italic';
  871. break;
  872. case 'u':
  873. cmd = 'underline';
  874. break;
  875. }
  876. if(cmd){
  877. this.win.focus();
  878. this.execCmd(cmd);
  879. this.deferFocus();
  880. e.preventDefault();
  881. }
  882. }
  883. }
  884. },
  885. <div id="method-Ext.form.HtmlEditor-insertAtCursor"></div>/**
  886. * Inserts the passed text at the current cursor position. Note: the editor must be initialized and activated
  887. * to insert text.
  888. * @param {String} text
  889. */
  890. insertAtCursor : function(text){
  891. if(!this.activated){
  892. return;
  893. }
  894. if(Ext.isIE){
  895. this.win.focus();
  896. var doc = this.getDoc(),
  897. r = doc.selection.createRange();
  898. if(r){
  899. r.pasteHTML(text);
  900. this.syncValue();
  901. this.deferFocus();
  902. }
  903. }else{
  904. this.win.focus();
  905. this.execCmd('InsertHTML', text);
  906. this.deferFocus();
  907. }
  908. },
  909. // private
  910. fixKeys : function(){ // load time branching for fastest keydown performance
  911. if(Ext.isIE){
  912. return function(e){
  913. var k = e.getKey(),
  914. doc = this.getDoc(),
  915. r;
  916. if(k == e.TAB){
  917. e.stopEvent();
  918. r = doc.selection.createRange();
  919. if(r){
  920. r.collapse(true);
  921. r.pasteHTML('&nbsp;&nbsp;&nbsp;&nbsp;');
  922. this.deferFocus();
  923. }
  924. }else if(k == e.ENTER){
  925. r = doc.selection.createRange();
  926. if(r){
  927. var target = r.parentElement();
  928. if(!target || target.tagName.toLowerCase() != 'li'){
  929. e.stopEvent();
  930. r.pasteHTML('<br />');
  931. r.collapse(false);
  932. r.select();
  933. }
  934. }
  935. }
  936. };
  937. }else if(Ext.isOpera){
  938. return function(e){
  939. var k = e.getKey();
  940. if(k == e.TAB){
  941. e.stopEvent();
  942. this.win.focus();
  943. this.execCmd('InsertHTML','&nbsp;&nbsp;&nbsp;&nbsp;');
  944. this.deferFocus();
  945. }
  946. };
  947. }else if(Ext.isWebKit){
  948. return function(e){
  949. var k = e.getKey();
  950. if(k == e.TAB){
  951. e.stopEvent();
  952. this.execCmd('InsertText','\t');
  953. this.deferFocus();
  954. }else if(k == e.ENTER){
  955. e.stopEvent();
  956. this.execCmd('InsertHtml','<br /><br />');
  957. this.deferFocus();
  958. }
  959. };
  960. }
  961. }(),
  962. <div id="method-Ext.form.HtmlEditor-getToolbar"></div>/**
  963. * Returns the editor's toolbar. <b>This is only available after the editor has been rendered.</b>
  964. * @return {Ext.Toolbar}
  965. */
  966. getToolbar : function(){
  967. return this.tb;
  968. },
  969. <div id="prop-Ext.form.HtmlEditor-buttonTips"></div>/**
  970. * Object collection of toolbar tooltips for the buttons in the editor. The key
  971. * is the command id associated with that button and the value is a valid QuickTips object.
  972. * For example:
  973. <pre><code>
  974. {
  975. bold : {
  976. title: 'Bold (Ctrl+B)',
  977. text: 'Make the selected text bold.',
  978. cls: 'x-html-editor-tip'
  979. },
  980. italic : {
  981. title: 'Italic (Ctrl+I)',
  982. text: 'Make the selected text italic.',
  983. cls: 'x-html-editor-tip'
  984. },
  985. ...
  986. </code></pre>
  987. * @type Object
  988. */
  989. buttonTips : {
  990. bold : {
  991. title: 'Bold (Ctrl+B)',
  992. text: 'Make the selected text bold.',
  993. cls: 'x-html-editor-tip'
  994. },
  995. italic : {
  996. title: 'Italic (Ctrl+I)',
  997. text: 'Make the selected text italic.',
  998. cls: 'x-html-editor-tip'
  999. },
  1000. underline : {
  1001. title: 'Underline (Ctrl+U)',
  1002. text: 'Underline the selected text.',
  1003. cls: 'x-html-editor-tip'
  1004. },
  1005. increasefontsize : {
  1006. title: 'Grow Text',
  1007. text: 'Increase the font size.',
  1008. cls: 'x-html-editor-tip'
  1009. },
  1010. decreasefontsize : {
  1011. title: 'Shrink Text',
  1012. text: 'Decrease the font size.',
  1013. cls: 'x-html-editor-tip'
  1014. },
  1015. backcolor : {
  1016. title: 'Text Highlight Color',
  1017. text: 'Change the background color of the selected text.',
  1018. cls: 'x-html-editor-tip'
  1019. },
  1020. forecolor : {
  1021. title: 'Font Color',
  1022. text: 'Change the color of the selected text.',
  1023. cls: 'x-html-editor-tip'
  1024. },
  1025. justifyleft : {
  1026. title: 'Align Text Left',
  1027. text: 'Align text to the left.',
  1028. cls: 'x-html-editor-tip'
  1029. },
  1030. justifycenter : {
  1031. title: 'Center Text',
  1032. text: 'Center text in the editor.',
  1033. cls: 'x-html-editor-tip'
  1034. },
  1035. justifyright : {
  1036. title: 'Align Text Right',
  1037. text: 'Align text to the right.',
  1038. cls: 'x-html-editor-tip'
  1039. },
  1040. insertunorderedlist : {
  1041. title: 'Bullet List',
  1042. text: 'Start a bulleted list.',
  1043. cls: 'x-html-editor-tip'
  1044. },
  1045. insertorderedlist : {
  1046. title: 'Numbered List',
  1047. text: 'Start a numbered list.',
  1048. cls: 'x-html-editor-tip'
  1049. },
  1050. createlink : {
  1051. title: 'Hyperlink',
  1052. text: 'Make the selected text a hyperlink.',
  1053. cls: 'x-html-editor-tip'
  1054. },
  1055. sourceedit : {
  1056. title: 'Source Edit',
  1057. text: 'Switch to source editing mode.',
  1058. cls: 'x-html-editor-tip'
  1059. }
  1060. }
  1061. // hide stuff that is not compatible
  1062. <div id="event-Ext.form.HtmlEditor-blur"></div>/**
  1063. * @event blur
  1064. * @hide
  1065. */
  1066. <div id="event-Ext.form.HtmlEditor-change"></div>/**
  1067. * @event change
  1068. * @hide
  1069. */
  1070. <div id="event-Ext.form.HtmlEditor-focus"></div>/**
  1071. * @event focus
  1072. * @hide
  1073. */
  1074. <div id="event-Ext.form.HtmlEditor-specialkey"></div>/**
  1075. * @event specialkey
  1076. * @hide
  1077. */
  1078. <div id="cfg-Ext.form.HtmlEditor-fieldClass"></div>/**
  1079. * @cfg {String} fieldClass @hide
  1080. */
  1081. <div id="cfg-Ext.form.HtmlEditor-focusClass"></div>/**
  1082. * @cfg {String} focusClass @hide
  1083. */
  1084. <div id="cfg-Ext.form.HtmlEditor-autoCreate"></div>/**
  1085. * @cfg {String} autoCreate @hide
  1086. */
  1087. <div id="cfg-Ext.form.HtmlEditor-inputType"></div>/**
  1088. * @cfg {String} inputType @hide
  1089. */
  1090. <div id="cfg-Ext.form.HtmlEditor-invalidClass"></div>/**
  1091. * @cfg {String} invalidClass @hide
  1092. */
  1093. <div id="cfg-Ext.form.HtmlEditor-invalidText"></div>/**
  1094. * @cfg {String} invalidText @hide
  1095. */
  1096. <div id="cfg-Ext.form.HtmlEditor-msgFx"></div>/**
  1097. * @cfg {String} msgFx @hide
  1098. */
  1099. <div id="cfg-Ext.form.HtmlEditor-validateOnBlur"></div>/**
  1100. * @cfg {String} validateOnBlur @hide
  1101. */
  1102. <div id="cfg-Ext.form.HtmlEditor-allowDomMove"></div>/**
  1103. * @cfg {Boolean} allowDomMove @hide
  1104. */
  1105. <div id="cfg-Ext.form.HtmlEditor-applyTo"></div>/**
  1106. * @cfg {String} applyTo @hide
  1107. */
  1108. <div id="cfg-Ext.form.HtmlEditor-autoHeight"></div>/**
  1109. * @cfg {String} autoHeight @hide
  1110. */
  1111. <div id="cfg-Ext.form.HtmlEditor-autoWidth"></div>/**
  1112. * @cfg {String} autoWidth @hide
  1113. */
  1114. <div id="cfg-Ext.form.HtmlEditor-cls"></div>/**
  1115. * @cfg {String} cls @hide
  1116. */
  1117. <div id="cfg-Ext.form.HtmlEditor-disabled"></div>/**
  1118. * @cfg {String} disabled @hide
  1119. */
  1120. <div id="cfg-Ext.form.HtmlEditor-disabledClass"></div>/**
  1121. * @cfg {String} disabledClass @hide
  1122. */
  1123. <div id="cfg-Ext.form.HtmlEditor-msgTarget"></div>/**
  1124. * @cfg {String} msgTarget @hide
  1125. */
  1126. <div id="cfg-Ext.form.HtmlEditor-readOnly"></div>/**
  1127. * @cfg {String} readOnly @hide
  1128. */
  1129. <div id="cfg-Ext.form.HtmlEditor-style"></div>/**
  1130. * @cfg {String} style @hide
  1131. */
  1132. <div id="cfg-Ext.form.HtmlEditor-validationDelay"></div>/**
  1133. * @cfg {String} validationDelay @hide
  1134. */
  1135. <div id="cfg-Ext.form.HtmlEditor-validationEvent"></div>/**
  1136. * @cfg {String} validationEvent @hide
  1137. */
  1138. <div id="cfg-Ext.form.HtmlEditor-tabIndex"></div>/**
  1139. * @cfg {String} tabIndex @hide
  1140. */
  1141. <div id="prop-Ext.form.HtmlEditor-disabled"></div>/**
  1142. * @property disabled
  1143. * @hide
  1144. */
  1145. <div id="method-Ext.form.HtmlEditor-applyToMarkup"></div>/**
  1146. * @method applyToMarkup
  1147. * @hide
  1148. */
  1149. <div id="method-Ext.form.HtmlEditor-disable"></div>/**
  1150. * @method disable
  1151. * @hide
  1152. */
  1153. <div id="method-Ext.form.HtmlEditor-enable"></div>/**
  1154. * @method enable
  1155. * @hide
  1156. */
  1157. <div id="method-Ext.form.HtmlEditor-validate"></div>/**
  1158. * @method validate
  1159. * @hide
  1160. */
  1161. <div id="event-Ext.form.HtmlEditor-valid"></div>/**
  1162. * @event valid
  1163. * @hide
  1164. */
  1165. <div id="method-Ext.form.HtmlEditor-setDisabled"></div>/**
  1166. * @method setDisabled
  1167. * @hide
  1168. */
  1169. <div id="cfg-Ext.form.HtmlEditor-null"></div>/**
  1170. * @cfg keys
  1171. * @hide
  1172. */
  1173. });
  1174. Ext.reg('htmleditor', Ext.form.HtmlEditor);
  1175. </pre>
  1176. </body>
  1177. </html>