Index: openacs-4/packages/ajaxhelper/www/resources/dojo-ajax/demos/storage/editor.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/dojo-ajax/demos/storage/Attic/editor.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ajaxhelper/www/resources/dojo-ajax/demos/storage/editor.js 22 Nov 2006 01:49:00 -0000 1.1 +++ openacs-4/packages/ajaxhelper/www/resources/dojo-ajax/demos/storage/editor.js 25 Dec 2006 16:39:50 -0000 1.2 @@ -12,7 +12,7 @@ dojo.require("dojo.event.*"); dojo.require("dojo.html"); dojo.require("dojo.lfx.*"); -dojo.require("dojo.widget.Editor"); +dojo.require("dojo.widget.Editor2"); dojo.require("dojo.storage.*"); var Moxie = { @@ -58,9 +58,9 @@ // get the new values var key = dojo.byId("storageKey").value; - var value = dojo.widget.byId("storageValue").getEditorContent(); + var richTextControl = dojo.widget.byId("storageValue"); + var value = richTextControl.getEditorContent(); - if(key == null || typeof key == "undefined" || key == ""){ alert("Please enter a file name"); return; @@ -183,9 +183,12 @@ var results = dojo.storage.get(key); // set the new Editor widget value - var storageValue = dojo.widget.byId("storageValue"); - storageValue._richText.editNode.innerHTML = results; - storageValue._richText._updateHeight(); + var richTextControl = dojo.widget.byId("storageValue") + richTextControl.replaceEditorContent(results); + // FIXME: Editor2 should be reflowing this height + // internally; we shouldn't be exposed to this - fix + // bug in Editor2 + richTextControl._updateHeight(); // print out that we are done this._printStatus("Loaded '" + key + "'");