I have just released version 0.8.0 of “It’s All Text!“, the Firefox extension that answers the age old question, “What happens when you give a yo-yo to a flock of flamingoes?”1
New Features
So, this version has several months of minor changes collected together. I kind of lost track of all of them, but here are the obvious ones from looking at the change log.
- Hot Key support
- Configure which corner to put the edit button on.
- The edit button goes away when you aren’t hovering or focusing the textarea. This lets you click buttons under where the edit button appears.
- An attempt to clean up possible memory problems.
- Code is GPL v3
So, get it while it’s hot!
Ciao!

136 Comments
Am I just dim? I’m on a Mac, followed the instructions to create a shell script in my ~/ folder that runs fine.
When I put that into the Editor box in IAT (by hand, the browse option won’t let me select it) all looks good.
First time I click edit my choice is removed and /usr/bin/open returns. What am I missing?
Brian
@Brian of London
No, you aren’t dim. There is a bug in IAT under FF3. cipher_nemo refered to it above.
Basically, set the value via the about:config display.
I’m sorry, I’ve been busy with a lot of other things and I haven’t used it as much in work so I haven’t bee working on IAT much at all.
Ciao!
Thanks! I seem to have got it working by quiting and restarting Firefox which also seems to have worked. What a great plugin. I’m doing some heave Wiki editing and having a few decent tools in an editor is great.
Yes, it is a great plug-in after I got it working. It lets me laugh at the thought of editing text in a small textbox, without the inconvenience of launching an editor manually and doing a copy/paste.
Works nicely so far.
Is there an easy way to change the default extension? I’m using this 99% of the time for wiki editing and my editor (I’m using Coda) does have a wiki highlight mode. How can I make the default export to Coda be in .wiki?
@Brian of London
Yup. Go into the preferences and change the list of extensions. The ‘default’ extension is the first extension.
Ciao!
I found a solution similar to the one of Thomas Baker.
What I wanted is opening the Editor GVim under andLinux (since I already have andLinux installed). The problem arised was that the file name with the full path was passed, and I needed a different path for gvim, since under andLinux, I access to the files over a shared folder, so /mnt/win/… and not C:\\…
My solution is It’s all Text calls a batch file called gvim.cmd, the content of this file is:
andcmd gvim /mnt/win/Dokumente\ und\ Einstellungen//Anwendungsdaten/Mozilla/Firefox/Profiles//itsalltext/%~nx1
This command uses a selfdefined path plus the filename without the path (%~nx1)
Additional Comment:
andlinux uses iso8859-1 encoding due to windows compatibility. Vim also uses this as default. When I want to edit wiki text, which is in utf-8 encoding, I need to set vim’s encoding to utf-8. For not doing this manually everytime, I modified my script above to:
andcmd gvim -c “:set enc=utf-8″ /mnt/win/Dokumente\ und\ Einstellungen//Anwendungsdaten/Mozilla/Firefox/Profiles//itsalltext/%~nx1
I noticed that Firefox 3.0.1 on Win XP Pro SP2 leaks a lot of memory when running with IAT 0.8.5 and Gmail (new version) in a tab. It can be as much as 200-600MB when running for a week or so.
I followed the advice at
https://wiki.mozilla.org/QA:Home_Page:Firefox_3.0_TestPlan:Leaks:LeakTesting-How-To
and kept removing add-ons and tabs until no leaks occurred.
The minimum reproducible scenario is:
FF 3.0.1
IAT 0.8.5
one tab open with Gmail
BTW, I really appreciate IAT and hope the leaks are simple to track down.
@brianc:
I have a new version that fixes this but I haven’t gotten it to work in iframes yet.
I initially had trouble getting IAT to work on my Mac (FF 3.0.1) since it kept silently failing when I tried using a hacked-together script of mine to get it to load inside vim in Terminal.app. I finally tracked it to escaping issues on my end. For anyone interested, you can save this as an executable text file and set it as IAT’s editor:
#!/bin/bash
osascript -e ‘tell application “Terminal”^Mactivate^Mdo script with command “vim \”‘”$@”‘\”; osascript -e \”tell application \\\”Firefox\\\”^Mactivate^Mend tell\”; exit”^Mend tell’
This will switch focus to Terminal.app, open a new terminal window, run vim in that window with the IAT file opened in it; and when you quit from vim, the terminal window will be closed, and focus will return to Firefox.
I’m doubtful that the subtle escaping and line-feeds will survive copy-and-paste, so you can get the original at:
http://3dgreg.com/scripts/terminal-vim
(Note: “^M” in the script is a special character produced by hitting ctrl-V and then <return>. It gets interpreted as a line feed, which is very different from the characters “^” and “M”.)
Make sure to use “Save Page As…” (and add execute permissions!), since copying-and-pasting from your browser would probably break it as well.
HTH,
Greg
For all you other cygwin / ratpoison / gvim folks out there, I got it to work with these (it was kind of tricky). This assumes that you have XWin display settings identical to those below. Also note that \”%~f1\” inserts the fully path qualified name in quotation marks as an argument to the shell script.
————–text.bat-(associate text files with this)
@echo off
@echo off
SET DISPLAY=127.0.0.1:0.0
SET CYGWIN_ROOT=\cygwin
SET RUN=%CYGWIN_ROOT%\bin\run -p /usr/X11R6/bin
SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\bin;%PATH%
SET XAPPLRESDIR=/usr/X11R6/lib/X11/app-defaults
SET XCMSDB=/usr/X11R6/lib/X11/Xcms.txt
SET XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
SET XNLSPATH=/usr/X11R6/lib/X11/locale
c:\cygwin\usr\local\bin\ratpoison.exe -c “exec /c/cygwin/home/scripts/text.sh \”%~f1\”"
—————
————–/c/cygwin/home/scripts/text.sh—-
usr/bin/gvim `cygpath –unix “$1″`
————–
Well, I’m actually a liar – It didn’t work the way I described before.
I finally got it to work with cygwin/ratpoison/gvim. This plugin rocks!
here’s the new versions:
–text.bat————————-
–(associate this with ————
–.txt in windows)—————–
@echo off
SET DISPLAY=127.0.0.1:0.0
SET CYGWIN_ROOT=\cygwin
SET RUN=%CYGWIN_ROOT%\bin\run -p /usr/X11R6/bin
SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\bin;%PATH%
SET XAPPLRESDIR=/usr/X11R6/lib/X11/app-defaults
SET XCMSDB=/usr/X11R6/lib/X11/Xcms.txt
SET XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
SET XNLSPATH=/usr/X11R6/lib/X11/locale
c:\cygwin\usr\local\bin\ratpoison.exe -c “exec /c/cygwin/home/scripts/text.sh \”%~f1\”"
—————– end of text.bat -
–text.sh———————
/usr/bin/gvim “`cygpath –unix \”$1\”`”
——————————
cheers,
tacitdynamite
… now if I could only get this to work with google docs, then I could code online … hm … perhaps greasemonkey …
@tacitdynamite: I don’t use google docs. Is it doing something like TinyMCE where it has an HTML area that is pretending to be a TEXTAREA?
I am having some difficulties getting this working on my OSX laptop (Firefox 3.0.1, OSX 10.4.1, It’s All Text 0.8.5). I created the shell script as suggested because I want to use /usr/bin/vi as my editor, set execute permission, configured the plugin to use the shell script, and restarted FF. The result is that the edit button appears, but when I click on it, nothing happens. If I try to run the ‘exec /usr/bin/open -a …’ line in a shell (using Terminal), an error flashes quickly but I don’t have time to read it before the terminal is terminated (ps doesn’t show any odd detached processes). Does anyone have any suggestions on how I can fix this?
@Ann – Sorry, I’m not familiar really with OS-X, but I would GUESS that “open” is a specific version of the “exec” command, so you are being redundant by putting exec and open on the same line. I believe “open” is not part of bash per se, but it part of the apple flavor unix, whereas “exec” IS part of bash. Maybe try using “exec” and pointing it to the actual executable?
@docwhat – Thanks for the link to TinyMCE; I hadn’t seen that before. From what I can tell by a cursory glance at TinyMCE and from what I assume to be true about Google Docs, they are the same in principle, but not in practice. They both leverage javascript to generate html text. I have a feeling that Google Docs was created with Google Web Kit, which generates (cross-browser and OS compatible) javascript from java code. I have no idea how Google Docs actually captures keystrokes, though; if you open up a new Google Document and view the source, it’s close to two thousand lines, and a quick search for ‘textarea’ turns up nothing. I can picture an easy little greasemonkey script that would add a textarea, though, and then copy the value of the textarea edited in an external editor into the document (copy and paste work fine).
Hey everybody, in case you didn’t know, the “View Source With” plugin for firefox is a great sister plugin to this one. Once you’ve written your script to load text into gvim, you can use it with “View Source With” to easily view source in gvim by default – leveraging it’s pretty printing and formatting abilibities. Yay!
@tacitdynamite – thanks for offering a suggestion, even if it isn’t your area of expertise (it’s not mine, either, obviously!).
I’ve tried a couple of scripts which were posted as possibly addressing the issue. For example, I’m now trying the script (it’s sh, not bash) which was posted under the name iat.sh at http://docwhat.gerf.org/2007/03/its_all_text_v06/. This version doesn’t have both an open and an exec. I think I’ve tried about three different scripts which have been posted.
When I run it from the command line, it gives the following error:
2008-10-13 12:40:11.304 open[2319] LSOpenFromURLSpec() returned -10827 for application /usr/bin/vi path /Users/ann/info/l.
2008-10-13 12:40:11.304 open[2319] Couldn’t open file: /Users/ann/info/l
I touched the file, so it exists, but I still get the error.
When I try it from FF, nothing happens at all.
I just wanted to write that I found a solution to my problem with OSX. I installed gvim. There’s a Darwin ports version here: http://www.akropolix.net/rik0/vim/
Happily using It’s All Text now
I’m using Arch Linux and Vim for editing with your extension. It works all great, just good work! But is there possibility to style the button via CSS or something – or will there be such possibility? Would be really cool, to style the button to my needs (and moving it via negative maring values inside the text area *g*)
Kind regards,
Dirk
@Dirk:
You should be able to style it with stylish. If you have Firebug or the DOM inspector you can see what the markup for the button looks like.
Ciao!
@docwhat: Would be more easy, if the button would have a CSS class
Well … okay … i tried
@namespace url(http://www.w3.org/1999/xhtml);
img[title="It's All Text!"] {
width:200px;
}
but it does not have any effect. The onl thing that seems to work is “visibility:hidden;” – no changing of position, size, or whatever possible
@Dirk:
You need a “!important” I think.
Ciao!
/usr/bin/edit launched TextWrangler successfully on my mac
Thanks for posting your script for Mac OS above, docwhat!
It works for me. To open my emacs, I just create a script called /usr/bin/start-emacs with the following content and put /usr/bin/start-emacs in the “Editor” preference in “It’s all text”. Here is the script content:
#!/bin/sh
if [ ! -f "$1" ]; then
touch “$1″
fi
exec open -a /Applications/Emacs.app “$1″
Instead of using the script one could also just use “open” as editor application in the “it’s all text” preferences, but that opens TextEditor on my system, and I don’t know how to change the default editor to Emacs.
Hi,
thanks for the great Add-on! I only discovered it recently, and am very excited.
I use Yahoo Mail. I know the text area for the message body is not really a text area, so I had no expectations here. But: the “To:”, “Cc:” and “Bcc:” fields are text areas, so the plugin works here.
The downside is that the YMail autocomplete feature in these fields stops working with IAT enabled. Normally, I would start typing a name/email address, and get a list of suggestions, based on my Address Book. However, with IAT, this does not work. (For the record, I am using the new YMail, as opposed to YMail Classic.)
Is there anything that needs to be done here? I was thinking that perhaps the IAT Preferences would allow me to define a list of web addresses for which IAT would be disabled… Similar to the IE Tab add-on, which allows me to define a list of addresses for which to use the IE engine by default.
Feel free to contact me if I can provide more info on this.
Thanks again for the great add-on.
Sam
Hi Sam!
The first thing I’d try is moving the edit button to a different corner. This fixes certain sites, depending on how they were written. I suspect they are using YUI and it’s probably getting upset that the autocomplete container is being moved.
Otherwise, feel free to open a bug at http://trac.gerf.org/itsalltext about it. Even if I don’t fix it ASAP, someone may give you a work around.
Ciao!
Hi,
I’m another Mac user having trouble getting this going.
Latest version of Leopard
Latest Firefox
Latest It’s all text
Trying to get IAT to use Aquamacs
IAT works fine when I let it default to textedit.
Created the following script to connect to Aquamacs
#!/bin/sh
# This is an example shell script for It’s All Text!
if [ ! -f "$@" ]; then
touch “$@”
fi
open -a /Applications/Aquamacs/”Aquamacs Emacs.app” “$@”
The script starts Aquamacs when I run it from the shell in the terminal.
When I put:
/usr/bin/open -a ~/iat.sh
into the editor in IAT’s preferences. I get “The path does not exist”.
I’m sure there is something simple I’m doing wrong but if someone could offer some
help I’d appreciate it.
Thanks for any help.
John
P.S. The tool works swell with textedit; I’d like to be able to use the emacs wikipedia mode though.
The editor field needs to only have a single script. You can’t pass additional arguments.
If you want to use the shell script, then just put in “
/Users/foobar/iat.sh“.Alternatively, you can run Aquamacs and from the menu choose “Tools” -> “Install Command Line Tool”
Then you can just enter “
/usr/bin/aquamacs” in the editor field.Ciao!
Thanks!
Works great now.
John
P.S. Sorry not to get back to you sooner. I appreciate the rapid response.
This is a great extension. I use Emacs (Carbon version on a Mac running Leopard).
I can get IAT to launch Emacs and edit text; everything works as advertised.
What I’d like better is, if Emacs is already running, it brings up a window in my
already-running Emacs with the text to be edited in it. That way, if I use it to edit
mail (in a browser, for my Gmail account), I don’t have to re-launch Emacs for
every message I compose. I can do this from Thunderbird, using a no-longer-supported
add-on called External Editor. I’d like to do it from IAT. I believe it involves using the
server feature of Emacs. Have you run into this question before?
-Marc Levoy
@Marc Levoy
I use this: http://www.emacswiki.org/emacs/GnuClient
Specifically, I configure IAT to call dtemacs.
Emacs Wiki is an awesome place for finding out neat emacs tricks and such.
Never mind, I got it working. In case someone else asks…
Under Carbon Emacs on the Mac, issue (server-start) inside Emacs,
e.g. from your Emacs initialize file, then in IAT set the editor to
/usr/bin/emacsclient. That’s all it takes! I have also set up hotkeys
so with one keystroke I can jump from my Gmail compose window to a new
frame in an already-running Emacs, and with another keystroke, which
calls (server-done), I can jump back to my compose window with newly
edited text.
I love it!
-Marc Levoy
A feature suggestion:
Allow setting default extension based on the server domain.
I could then set tiddlyspot.com to use .tw and wikipedia.org to use .mediawiki – allowing me to detect filetype and automatically use the correct syntax highlighting in vim – whilst leaving other domains to use .txt
I’m sure this feature would also be useful for bloggers, who might want some slightly different behaviour for blog entry than for other editing tasks.
Medains,
perhaps your editor is able to detect the filetype from the filename, not just from the extension. Have you checked? (vim does that for me.)
Sam