Setting Editor.Text value when Editor block style is display:none in FireFox

  •  05-10-2007, 10:46 AM

    Setting Editor.Text value when Editor block style is display:none in FireFox

    (originally posted in Cute Editor for ASP forum by accident -- sorry)

    I am trying to set the initial text of the editor to something from the database. The editor resides in a 'hidden' block until the user clicks on something to 'unhide' it.   I'll include the example at the bottom.

    Works fine in IE, but throws an error in FF. (Haven't checked other browsers.) The error *only* is thrown if the encompassing block is hidden. Take the 'display:none' out and we're good as gold.

    ----Begin Head----
    myEditor.Text = [[FromDataBase]]
    ----End Head----

    ----Begin Body----
    <a href="#" onClick="jsChangeStyleToBlock('DivEdit'); return false;">Show Editor</a>
    <div id="DivEdit" style="display:none;">
      <CE:Editor id="myEditor" runat="server"></CE:Editor>
    </div>

    ----End Body----

    ----Begin Error (Thx to FireBug)----
    uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMNSHTMLDocument.designMode]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://SITE/CuteEditor/Load.ashx?type=scripts&file=Gecko_Loader :: Ox87a :: line 3" data: no]
    ----End Error----

    Edit: Oh, btw, this worked fine before I upgraded us to the most recent version.

View Complete Thread