| 14 | | if(dojo.hostenv.post_load_){ |
| 15 | | (function(){ |
| 16 | | var savetextarea = dojo.doc().createElement('textarea'); |
| 17 | | savetextarea.id = "dojo.widget.RichText.savedContent"; |
| 18 | | savetextarea.style = "display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;"; |
| 19 | | dojo.body().appendChild(savetextarea); |
| 20 | | })(); |
| 21 | | }else{ |
| 22 | | //dojo.body() is not available before onLoad is fired |
| 23 | | try { |
| 24 | | dojo.doc().write('<textarea id="dojo.widget.RichText.savedContent" ' + |
| 25 | | 'style="display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;"></textarea>'); |
| 26 | | }catch(e){ } |
| | 14 | // but do not try doing document.write if we are using xd loading. |
| | 15 | // document.write will only work if RichText.js is included in the dojo.js |
| | 16 | // file. If it is included in dojo.js and you want to allow rich text saving |
| | 17 | // for back/forward actions, then set djConfig.allowXdRichTextSave = true. |
| | 18 | if(!djConfig["useXDomain"] || djConfig["allowXdRichTextSave"]){ |
| | 19 | if(dojo.hostenv.post_load_){ |
| | 20 | (function(){ |
| | 21 | var savetextarea = dojo.doc().createElement('textarea'); |
| | 22 | savetextarea.id = "dojo.widget.RichText.savedContent"; |
| | 23 | savetextarea.style = "display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;"; |
| | 24 | dojo.body().appendChild(savetextarea); |
| | 25 | })(); |
| | 26 | }else{ |
| | 27 | //dojo.body() is not available before onLoad is fired |
| | 28 | try { |
| | 29 | dojo.doc().write('<textarea id="dojo.widget.RichText.savedContent" ' + |
| | 30 | 'style="display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;"></textarea>'); |
| | 31 | }catch(e){ } |
| | 32 | } |