Mozex - a Mozilla Extension to configure an external editor for textboxes

2009-8-13: apparently Mozex doesn't work with "current" versions (ie > v3) of Firefox, so try It's all text instead.


Install Mozex, a browser extension. Tested to work under Mozilla 1.7.12 on an xhier'ed Solaris box, as well as Firefox 1.5 under Mac OS X 10.4, Firefox 1.5 on Ubuntu/Dapper and Firefox 1.5 under Windows XP.

Note that if you start with Tools -> Extensions (in Firefox) and search for the extension, it takes you to an older version of Mozex that is not compatible with newer versions of Firefox.

Firefox 2.0 notes

  • The plugin located on smb:\\\exports\export\COMMON\mozilla\plugins\mozex-1.9.3.xpi
    has been updated to work - I edited the install.rdf file located in the .xpi file to change the
    the maxversion check to 2.* . I am using it to write this TWIKI update! )
    You may have to click on the Edit area after a save to sync the web page
References Firefox Mozex Plugin page

If you click an alleged download link, and nothing happens, check your browser settings. Under categories such as "content" or "security", some options which limit browser capability, for instance by blocking pop-up windows, sometimes cause the downloads to silently fail. You may need to (temporarily) relax such restrictions in order to download Mozex.

Configuration (Unix/Linux)

To configure Mozex for Mozilla (ie: not firefox) (say on cscf.cs) you should click Edit->Preferences->Mozex and configure a program for textarea. The suggested one is xterm -e vim %t or if you prefer emacs you would use xterm -e emacs %t. Under firefox you must go to Tools->Extensions at which point you are give a list of installed extensions. Click on Mozex. Then click on Preferences and look for textarea and add xterm -e vim %t if you prefer vim.

You may want to add a -geometry option to xterm to enlarge it. Use xwinfo under Unix so figure out how large the window is, i.e. type xwinfo in the window, resize to where you want and click on the window and xwinfo will output the geometry of the xterm (or any X application).

You do not need to constantly open a new editing window for every save you make. Just write the file out (in vim you simply type ESC:w) and voila the text window in your browser will be updated! Then use preview to see what it looks like. If you like it save the result in the twiki. You do not need to close the xterm containing the editor. Feel free to continue editing. Just hit the browser back button to get to the textbox again (in other words, do NOT click Edit in the Twiki webpage). It will be update instantly with any changes you have made in the editor (provided you have written the buffer stored by the text editor out to the temporary file that your browser is using to store the contents of the textarea). Warning: If you lose the tab or window, i.e, you cannot click back anymore to get to it or you closed the tab or browser window then any changes you made via the external editor will be lost.

You cannot use both a text editor in the xterm and edit the textbox in the browser simultaneously. Hardly a surprise.

Strangely enough under Ubuntu/Dapper if one tries to use gnome-terminal instead of xterm it fails silently albeit the temporary files are seen under /tmp.

  • gnome-terminal -e requires the command to be a single argument. To execute the remainder of the command line, use -x: gnome-terminal -x vim %t. -- IL - 21 Mar 2007

Configuration (Windows)

  • Um, I don't know where to do this! (Lawrence)

Configuration (Mac)

  • I got it working on my Mac, mfcfmac05.math (I'm using it now to edit this.)
  • You have to have xterm running already; it won't start it up.
  • Set the Textarea and Source "Text Editor" to:
/bin/csh -c "setenv DISPLAY :0.0; setenv PATH `/bin/showpath standard`; exec xterm -e vim %t"

From Fri Sep 29 09:50:45 2006
I finally got it working with Firefox on my Mac.

Calling the native "Terminal" program doesn't work,
as that program silently ignores its command line,
so I had to use xterm instead, which had its own problems.

One trick is that the DISPLAY environment needs to be set,
as does the PATH.  And whenever you use it, there has to be an
xterm running already or it won't be able to start up a new window.

In the Textarea and Source configurations, set the Text Editor to
  /bin/csh -c "setenv DISPLAY :0.0; setenv PATH `/bin/showpath standard`; exec xterm -e vim %t"

On non-xhiered Macs, the PATH will need to be set to something different.
Some people might prefer gvim, and might want to give xterm additional flags.

It looks like the other web browsers are finally catching up to lynx.
Firefox even does <Q> correctly.
Edit | Attach | Watch | Print version | History: r15 < r14 < r13 < r12 < r11 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r15 - 2013-01-29 - DrewPilcher
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback