dijit._editor.RichText.onLoad
dojo.require("dijit._editor.RichText");
defined in dijit/_editor/RichText.js
handler after the content of the document finishes loading
Usage
function (e) (view source)
this.isLoaded = true; if(!this.window.__registeredWindow){ this.window.__registeredWindow=true; dijit.registerWin(this.window); } if(!dojo.isIE && (this.height || dojo.isMoz)){ this.editNode=this.document.body; }else{ this.editNode=this.document.body.firstChild; var _this = this; if(dojo.isIE){ // #4996 IE wants to focus the BODY tag var tabStop = this.tabStop = dojo.doc.createElement('<div tabIndex=-1>'); this.editingArea.appendChild(tabStop); this.iframe.onfocus = function(){ _this.editNode.setActive(); } } } try{ this.setDisabled(false); }catch(e){ // Firefox throws an exception if the editor is initially hidden // so, if this fails, try again onClick by adding "once" advice var handle = dojo.connect(this, "onClick", this, function(){ this.setDisabled(false); dojo.disconnect(handle); }); } this._preDomFilterContent(this.editNode); var events=this.events.concat(this.captureEvents),i=0,et; while((et=events[i++])){ this.connect(this.document, et.toLowerCase(), et); } if(!dojo.isIE){ try{ // sanity check for Mozilla //AP: what's the point of this? // this.document.execCommand("useCSS", false, true); // old moz call this.document.execCommand("styleWithCSS", false, false); // new moz call //this.document.execCommand("insertBrOnReturn", false, false); // new moz call }catch(e2){ } // FIXME: when scrollbars appear/disappear this needs to be fired }else{ // IE contentEditable // give the node Layout on IE this.connect(this.document, "onmousedown", "_onMouseDown"); // #4996 fix focus this.editNode.style.zoom = 1.0; } if(this.focusOnLoad){ setTimeout(dojo.hitch(this, "focus"), 0); // have to wait for IE to set unselectable=off } this.onDisplayChanged(e); if(this.onLoadDeferred){ this.onLoadDeferred.callback(true); }
parameter | type | description |
---|---|---|
e |