Opened 16 years ago

Closed 16 years ago

#355 closed defect (worksforme)

Requiring dojo.widget.RichText after page load overwrites entire page

Reported by: srini Owned by: anonymous
Priority: high Milestone:
Component: Widgets Version: 0.2
Keywords: Cc:
Blocked By: Blocking:


I don't know if this is by design, but if you dynamically call dojo.require("dojo.widget.RichText?"), the document.write() call inside of it clobbers the page when the code gets eval'd.

Example (with Editor which requires RichText?):


<script type="text/javascript" src="js/dojo/dojo.js"></script>

<script type="text/javascript">
// widget build of dojo.js

function doMakeRich()
  var editor = dojo.widget.fromScript("Editor", {}, 


<div id="california">I live in California.</div>

<script type="text/javascript">
setTimeout("doMakeRich();", 2000);


The alternative is to load dojo.widget.Editor at the top of the case, but for my page, the editor is used only on demand and not very often. It would be nice to load the rich text editor's code on demand.

Change History (1)

comment:1 Changed 16 years ago by dylan

Resolution: worksforme
Status: newclosed

I'm able to load Editor2 using dojo.widget.createWidget(), so I'm thinking this has been resolved.

Note: See TracTickets for help on using tickets.