[Project_owners] <editor> in Thunderbird not working

Ezequiel Calderara ezechico at gmail.com
Thu Jan 3 14:19:52 PST 2008


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 <schmid-thomas at gmx.net> 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
> Project_owners at mozdev.org
> https://www.mozdev.org/mailman/listinfo/project_owners
>



-- 
______
Ezequiel.

Http://www.ironicnet.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mozdev.org/pipermail/project_owners/attachments/20080103/fd26786b/attachment.html 


More information about the Project_owners mailing list