Changeset 14417
- Timestamp:
- 07/14/08 00:58:52 (12 months ago)
- Location:
- dijit/trunk
- Files:
-
- 2 modified
-
demos/mail.html (modified) (2 diffs)
-
_editor/RichText.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/demos/mail.html
r14413 r14417 230 230 231 231 <!-- new message part --> 232 <!-- : editor will be created programmically to avoid init issues --> 233 232 <div dojoType="dijit.Editor" region="center" style="overflow:auto" 233 extraPlugins="['createLink','insertImage',{name:'dijit._editor.plugins.FontChoice', command: 'fontName', generic: true},'fontSize']" 234 235 > 236 <i> This is just a sample message. There is email-address auto-complete in the to: field. 237 <br><br> give it a whirl. 238 </i> 239 </div> 234 240 <div dojoType="dijit.layout.ContentPane" region="bottom" style="height:32px" align="center"> 235 241 <button dojoType="dijit.form.Button" iconClass="mailIconOk" … … 288 294 tabs.addChild(newTab); 289 295 tabs.selectChild(newTab); 290 newTab.containerNode.appendChild(document.createElement('div'));291 newTab.containerNode.lastChild.innerHTML='<i> This is just a sample message. There is email-address auto-complete in the to: field.<br><br> give it a whirl.</i>';292 var editor = new dijit.Editor({293 extraPlugins: ['createLink','insertImage',{name:'dijit._editor.plugins.FontChoice', command: 'fontName', generic: true},'fontSize'],294 region:'center',295 height:'100%'296 },newTab.containerNode.lastChild);297 if(editor.iframe){298 //if iframe is used, don't use addChild otherwise the editor is not working properly because299 //addChild will re-attach the editor to the document DOM, instead use this hack300 newTab._setupChild(editor);301 setTimeout(dojo.hitch(newTab,'layout'),0)302 }else{303 newTab.addChild(editor);304 }305 296 </script> 306 297 </button> -
dijit/trunk/_editor/RichText.js
r14400 r14417 214 214 215 215 216 // note that on Safari lower than 420+, we have to get the iframe217 // by ID in order to get something w/ a contentDocument property218 219 var contentDoc = this.iframe.contentDocument;220 contentDoc.open();221 contentDoc.write(this._getIframeDocTxt(html));222 contentDoc.close();223 216 224 217 // now we wait for onload. Janky hack! … … 234 227 }else if(this.iframe.contentDocument){ 235 228 // for opera 229 // TODO: this method is only being called for FF2; can we remove this? 236 230 this.window = this.iframe.contentDocument.window; 237 231 this.document = this.iframe.contentDocument; … … 245 239 return; 246 240 } 241 242 // note that on Safari lower than 420+, we have to get the iframe 243 // by ID in order to get something w/ a contentDocument property 244 var contentDoc = this.document; 245 contentDoc.open(); 246 contentDoc.write(this._getIframeDocTxt(html)); 247 contentDoc.close(); 247 248 248 249 dojo._destroyElement(tmpContent);