X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/HtmlEditor.html diff --git a/docs/source/HtmlEditor.html b/docs/source/HtmlEditor.html index acf5b0ef..8057d284 100644 --- a/docs/source/HtmlEditor.html +++ b/docs/source/HtmlEditor.html @@ -1,5 +1,22 @@ -
+ +/** - * @class Ext.form.field.HtmlEditor + + + + +\ No newline at end of file +The source code + + + + + + +/** + * @class Ext.form.field.HtmlEditor * @extends Ext.Component * * Provides a lightweight HTML Editor component. Some toolbar features are not supported by Safari and will be @@ -43,10 +60,6 @@ * } * }); * - * @constructor - * Create a new HtmlEditor - * @param {Object} config - * @xtype htmleditor */ Ext.define('Ext.form.field.HtmlEditor', { extend:'Ext.Component', @@ -76,47 +89,47 @@ Ext.define('Ext.form.field.HtmlEditor', { } ], - /** + /** * @cfg {Boolean} enableFormat Enable the bold, italic and underline buttons (defaults to true) */ enableFormat : true, - /** + /** * @cfg {Boolean} enableFontSize Enable the increase/decrease font size buttons (defaults to true) */ enableFontSize : true, - /** + /** * @cfg {Boolean} enableColors Enable the fore/highlight color buttons (defaults to true) */ enableColors : true, - /** + /** * @cfg {Boolean} enableAlignments Enable the left, center, right alignment buttons (defaults to true) */ enableAlignments : true, - /** + /** * @cfg {Boolean} enableLists Enable the bullet and numbered list buttons. Not available in Safari. (defaults to true) */ enableLists : true, - /** + /** * @cfg {Boolean} enableSourceEdit Enable the switch to source edit button. Not available in Safari. (defaults to true) */ enableSourceEdit : true, - /** + /** * @cfg {Boolean} enableLinks Enable the create link button. Not available in Safari. (defaults to true) */ enableLinks : true, - /** + /** * @cfg {Boolean} enableFont Enable font selection. Not available in Safari. (defaults to true) */ enableFont : true, - /** + /** * @cfg {String} createLinkText The default text for the create link prompt */ createLinkText : 'Please enter the URL for the link:', - /** + /** * @cfg {String} defaultLinkValue The default value for the create link prompt (defaults to http:/ /) */ defaultLinkValue : 'http:/'+'/', - /** + /** * @cfg {Array} fontFamilies An array of available font families */ fontFamilies : [ @@ -127,7 +140,7 @@ Ext.define('Ext.form.field.HtmlEditor', { 'Verdana' ], defaultFont: 'tahoma', - /** + /** * @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) ? ' ' : '​', @@ -150,20 +163,20 @@ Ext.define('Ext.form.field.HtmlEditor', { var me = this; me.addEvents( - /** + /** * @event initialize * Fires when the editor is fully initialized (including the iframe) * @param {Ext.form.field.HtmlEditor} this */ 'initialize', - /** + /** * @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', - /** + /** * @event beforesync * Fires before the textarea is updated with content from the editor iframe. Return false * to cancel the sync. @@ -171,7 +184,7 @@ Ext.define('Ext.form.field.HtmlEditor', { * @param {String} html */ 'beforesync', - /** + /** * @event beforepush * Fires before the iframe editor is updated with content from the textarea. Return false * to cancel the push. @@ -179,21 +192,21 @@ Ext.define('Ext.form.field.HtmlEditor', { * @param {String} html */ 'beforepush', - /** + /** * @event sync * Fires when the textarea is updated with content from the editor iframe. * @param {Ext.form.field.HtmlEditor} this * @param {String} html */ 'sync', - /** + /** * @event push * Fires when the iframe editor is updated with content from the textarea. * @param {Ext.form.field.HtmlEditor} this * @param {String} html */ 'push', - /** + /** * @event editmodechange * Fires when the editor switches edit modes * @param {Ext.form.field.HtmlEditor} this @@ -420,7 +433,7 @@ Ext.define('Ext.form.field.HtmlEditor', { this.callParent(arguments); }, - /** + /** * Sets the read only state of this field. * @param {Boolean} readOnly Whether the field should be read only. */ @@ -453,7 +466,7 @@ Ext.define('Ext.form.field.HtmlEditor', { } }, - /** + /** * Protected method that will not generally be called directly. It * is 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). @@ -466,7 +479,7 @@ Ext.define('Ext.form.field.HtmlEditor', { 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;cursor:text}</style></head><body></body></html>', me.iframePad, h); + 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 @@ -609,7 +622,7 @@ Ext.define('Ext.form.field.HtmlEditor', { }); }, - /** + /** * Toggles the editor between standard and source edit mode. * @param {Boolean} sourceEditMode (optional) True for source edit, false for standard */ @@ -675,7 +688,7 @@ Ext.define('Ext.form.field.HtmlEditor', { return this; }, - /** + /** * Protected method that will not generally be called directly. If you need/want * custom HTML cleanup, this is the method you should override. * @param {String} html The HTML to be cleaned @@ -698,7 +711,7 @@ Ext.define('Ext.form.field.HtmlEditor', { return html; }, - /** + /** * @protected method that will not generally be called directly. Syncs the contents * of the editor iframe with the textarea. */ @@ -735,7 +748,7 @@ Ext.define('Ext.form.field.HtmlEditor', { return value; }, - /** + /** * @protected method that will not generally be called directly. Pushes the value of the textarea * into the iframe editor. */ @@ -957,7 +970,7 @@ Ext.define('Ext.form.field.HtmlEditor', { this.updateToolbar(); }, - /** + /** * Protected method that will not generally be called directly. It triggers * a toolbar update by reading the markup state of the current selection in the editor. */ @@ -1010,7 +1023,7 @@ Ext.define('Ext.form.field.HtmlEditor', { this.relayCmd(btn.getItemId()); }, - /** + /** * Executes a Midas editor command on the editor document and performs necessary focus and * toolbar updates. <b>This should only be called after the editor is initialized.</b> * @param {String} cmd The Midas command @@ -1025,7 +1038,7 @@ Ext.define('Ext.form.field.HtmlEditor', { }, 10, this); }, - /** + /** * Executes a Midas editor command directly on the editor document. * For visual commands, you should use {@link #relayCmd} instead. * <b>This should only be called after the editor is initialized.</b> @@ -1068,7 +1081,7 @@ Ext.define('Ext.form.field.HtmlEditor', { } }, - /** + /** * Inserts the passed text at the current cursor position. Note: the editor must be initialized and activated * to insert text. * @param {String} text @@ -1157,7 +1170,7 @@ Ext.define('Ext.form.field.HtmlEditor', { return null; // not needed, so null }(), - /** + /** * Returns the editor's toolbar. <b>This is only available after the editor has been rendered.</b> * @return {Ext.toolbar.Toolbar} */ @@ -1165,7 +1178,7 @@ Ext.define('Ext.form.field.HtmlEditor', { return this.toolbar; }, -