Thursday October 07, 2004
Following on from my last rather long post, I'd like to pass on a tip if you are editing a big post. The standard HTML textarea is a bit limiting for editing, even if you do use some of the whizzy Roller plugins to help. If you'd prefer to use your favorite text editor and you are using Mozilla or Firefox, you can. Nip over to http://mozex.mozdev.org/index.html and install the mozex plugin. After you've restarted your browser, go into the settings page for mozex and you'll see a textbox labelled 'Textarea'. With mozex enabled, left-clicking on a browser textarea will pull up a context menu, and if you select the mozex entry, then 'Edit Textarea', mozex will run the command you specify on the configuration page, passing the contents of the textarea in a file. The name of the temporary file is available as %f
There's a slight wrinkle: mozex doesn't split up the arguments properly, so if you put something like
gnome-terminal --title="mozex" --command="vi %t"
as the command, mozex tries to execute the entire string as the pathname of the command, which of course it isn't. What you neeed is something like the following little helper shell script (mine's called mozex_edit) somewhere in your PATH:
#!/bin/ksh -p exec gnome-terminal --title="mozex" --command="vi $1"
Then put
mozex_edit %t
in the mozex 'Textarea' configuration entry, and you're ready. Once you've edited your content via the mozex right-click menu entry, click the left mouse button in the textarea to paste the edited text into the textarea.
Update: The version above won't work with Firefox 1.0 - you can get a version that works with 1.0 from http://www.extensionsmirror.nl/index.php?showtopic=70
Posted by alanbur
( Oct 07 2004, 04:17:15 PM BST )
Permalink
Comments [0]