When you say that doesn' t work... do you have any error message in the console?
Shouldn't you define the editor object? On Jan 3, 2008 7:03 PM, Thomas Schmid <[EMAIL PROTECTED]> wrote: > Hi, > > I want to use an "editor" instead of a textbox. But I am experiencing a > strange behavior. > The following code runs smoothly in Firefox. But for some reason it does > not work with Thunderbird. > > What is wrong with this code? Why isn't it running with Thunderbird? > Has anyone experienced a similar issue? > > Thanks > > Thomas > > > <?xml version="1.0"?> > <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> > > <!DOCTYPE window > > <window id="yourwindow" > xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" > > <script type="text/javascript"> > <![CDATA[ > > function makeEditable() > { > var editor = document.getElementById('content-frame'); > > editor.makeEditable('html', false); > > var htmlEditor = editor.getHTMLEditor(editor.contentWindow); > htmlEditor = > htmlEditor.QueryInterface(Components.interfaces.nsIPlaintextEditor); > > htmlEditor.insertText("Test"); > } > > ]]> > </script> > <vbox flex="1"> > <editor type="content-primary" id="content-frame" editortype="html" > src="about:blank" flex="1"/> > <button label="Edit" oncommand="makeEditable();"/> > </vbox> > </window> > > _______________________________________________ > Project_owners mailing list > [email protected] > https://www.mozdev.org/mailman/listinfo/project_owners > -- ______ Ezequiel. Http://www.ironicnet.com
_______________________________________________ Project_owners mailing list [email protected] https://www.mozdev.org/mailman/listinfo/project_owners
