It’s All Text! v0.6+

I wrote It’s All Text! for myself. When 2.0 was released it broke so I went looking for a replacement. The others weren’t very good. So I set about fixing MozEx. It was then that I realized that MozEx had way more stuff in it than I needed and some parts were just a pain to maintain.

The author of MozEx got it working with FireFox 2.0 eventually. But I had this itch because I saw things I can improve.

Now it’s three months later and I’ve released version 0.6.1 now that Addons is back. This will be my release candidate for 1.0 because I have fixed the four most annoying problems:

  • The edit button is in the right place. If it isn’t perfect, it’s really close. Even for and .
  • Right clicking on the edit button lets you pick a file extension.
  • When the user first starts or the editor isn’t in the right place, it explains to the user what happened and what to do about it.
  • The rules for when and what to refresh finally seem right. At least for me… ;-)

The last big bug I want to do something for, even if I can’t fix it, is the “Mac OS X select an editor that actually is a .app directory” problem. It’s hard for me to work on because I have to borrow my wifes Mac to work on it.

The versions up to now, as flawed as they have been, have actually gotten some really good feedback both in comments on this site and on and even from blogs in Switzerland and Japan! Note: I have been told that the addons comments are still in the process of being moved from the old site to the new one.

Jason Barnabe, the author of the excellent extension for Firefox has helped design an API for It’s All Text! so that you can use an external editor in Stylish or in any other extension that decides it wants to support It’s All Text!

Finally, if you design a website, you can add the attribute itsalltext-extension to any textarea and it’ll be the default extension used for that textarea (don’t forget the leading dot, .). You can see it below in the “Leave a comment” box.

I want to thank everyone who has given me all this great feedback. Even people telling me it doesn’t work is helpful. Every comment spurred me on to make it better so I really owe it’s current level of usability to all of you. Please, give yourselves a hand.

I can’t wait to see what feedback I get next. Yay!

Ciao!

Previously: It’s All Text!

EDIT (2007/04/04): I’m so stupid. Thankfully, Robert Daeley explained exactly what I didn’t understand about Mac OS X. I need to use /usr/bin/open on Mac OS X. Now that I understand what open is and why it should be used, I will finally have that part of Mac OS X fixed in short order. Now I just need to figure out make the close button not be display: none in preferences. Grrrr.

Mentions (till Addons gets trackbacks):

This entry was posted in My Projects and tagged , , , , , . Bookmark the permalink. Comments are closed, but you can leave a trackback: Trackback URL.

145 Comments

  1. Posted 2007-07-12 at 7:10 am | Permalink

    Is it possible to make ITA installable under seamonkay?

  2. Posted 2007-07-12 at 9:08 am | Permalink

    Michael Kesper:

    Yes it is, however some of the facilities (overlays, etc.) are different. I’ll probably do this after I finish my current round of bug fixing. :-/ It’ll be in my todo list, though.

    Ciao!

  3. Posted 2007-07-12 at 8:55 am | Permalink

    teemu:

    I really have no idea how IAT could be causing this. It doesn’t mean it isn’t, but it’s sort of like saying that changing your car’s radio station is causing your tires to loose pressure. If there is a causal relationship, it is complicated and unpredictable.

    When you uninstall IAT (not disable it) then the files are removed, nothing is left. There will be some preferences set in prefs.js, but they all start with “extensions.itsalltext” and should have zero effect on Mozilla.

    So here’s what we know for sure:

    • The page is being servered with a Content-Type that Firefox is deciding you need to download (or possibly no Content-Type).
    • Internet Explorer tries to view it as HTML anyway (no suprise).
    • You said that it happened when you installed IAT and it did not go away when you uninstall IAT.

    If you have access to wget (windows download) try running this command (changing the URL from my homepage to the URL of the page you are trying to view):

    wget -O- -q --save-headers http://docwhat.gerf.org/
    

    You should see a line like:

    Content-Type: text/html; charset=UTF-8

    If you get some other Content-Type other than “text/html” then that is the problem. The charset shouldn’t be relevant to this problem.

    If the above turns up nothing and you absolutely feel that it might be IAT, you can:

    1. Create a new profile in Mozilla.
    2. Try the problem page with the new profile. If it breaks then it’s not IAT otherwise continue…
    3. Install IAT.
    4. Try the problem page again.
      • If it works, then it isn’t IAT.
      • If it breaks then something very weird is wrong with IAT. I would need the output of the wget command from above (without the grep) to even start to debug the problem.

    Ciao!

    PS: This website is all PHP and it isn’t causing any problems for you.

  4. sa
    Posted 2007-07-12 at 12:01 pm | Permalink

    An option to disable the yellow animation would be nice.

  5. Posted 2007-07-12 at 10:28 pm | Permalink

    sa:

    Really? Awww… I’m bummed. I figured that was the least dislikable feature!

    *sigh* Adding it to my todo list…

    Ciao!

  6. Posted 2007-07-13 at 10:24 am | Permalink

    Great extension! One quick question – is there an easy way to set the default file extension to
    something other than ‘.txt’? I find I’m usually typing in text areas where ‘.html’ would be more
    appropriate.

  7. Posted 2007-07-13 at 11:28 am | Permalink

    Rampion:

    Absolutely! Either right click on the “edit” button or right click in the textarea and select “It’s All Text!” and choose from the existing extensions or add a new one! You can also edit the list of extensions via the preferences.

    Ciao!

  8. TommyB
    Posted 2007-07-13 at 11:33 am | Permalink

    Hi,

    thanks for the great plugin – it’s really helpful and worth to work on it!

    I have one Problem: I’m using the plugin InFormEnter as well as It’s all text. InFormEnter puts a button right after each form field. It’s helping to put predefined text into each form field. After installing It’s all Text the InFormEnter Plugin puts TWO buttons after each textarea form field. I’m no programmer, but it looks like that some process modifying the webpage is processed double.
    Maybe you can discuss the problem with the programmer of InFormEnter.

    best thomas

  9. Posted 2007-07-15 at 12:32 am | Permalink

    TommyB:

    I took a look at it, and what’s going on is:

    1. IFE (InFormEnter) determines that the next sibling to the textarea is not an IFE button and creates a button immediately after the textarea.
    2. IAT creates the button immediately after the textarea, pushing the IFE button away from the textarea making the second sibling.
    3. IFE determines that the next sibling to the textarea is not an IFE button (it’s the IAT button) and creates a button immediately after the textarea.
    4. IAT doesn’t care where the button is once it has been created, and does nothing.

    I cannot really detect this situation in IAT. IFE needs to figure out that the button is already created and not create another one.

    I have written an email to the author of IFE.

    Ciao!

  10. chiggsy
    Posted 2007-07-16 at 12:33 pm | Permalink

    Lovely plugin. I should point out that if one installs vim-app from macports, one then gets a binary /opt/local/bin/gvim which can be successfully used to launch this plugin. Working for me now. Brilliant, brilliant work!`

  11. Lil Devil
    Posted 2007-07-27 at 1:17 am | Permalink

    Hi,

    I just discovered this plugin and it’s very useful to me. But I noticed one of the bugs you think you fixed “* Fixed the context menu jumping all over the place.” isn’t really fixed at all for me. When I right-click the edit button, the outline of the menu appears in it’s correct place for a moment, then moves to the right-hand edge of the screen, then to the lower-right corner where it stays put and draws completely. Now a show-stopper but it sure is annoying.

    Thanks for such a useful extension!

  12. Posted 2007-07-27 at 8:48 am | Permalink

    Yeah, the context menu seems to be, in part, a bug in Mozilla. I’m tracking those bugs and hopefully it’ll be fixed some day. :-/

    Meanwhile, the next version I release will have the “best version” of the context menu possible with Mozilla in it’s current state.

    Unfortunately, I have introduced memory leaks in my current tree so I’ve been trying to fix those. Added to, real-life has been a little busy. So I haven’t spent much time on this.

    Sorry. :-(

    I’ll see if I can make some time this weekend.

    Ciao!

  13. teemu
    Posted 2007-07-29 at 8:52 pm | Permalink

    docwhat, thanks for your response of 2007-07-12. I downloaded wget and looked at what content our server was returning in response to the different queries. Up to the end of the first section, there was nothing different between what was returned for the query “http://our.internal.wiki/mediawiki/index.php?title=The_article_in_question&action=edit” and “http://our.internal.wiki/mediawiki/index.php?title=The_article_in_question&action=edit&section=1″, but when I give these URLs to the browser, the first one results in the popup I described being displayed, while the second one works normally, bringing up an edit box for the section.

    By the way, soon after I reported that this works normally in IE, it started misbehaving there, too. If I try the first URL, IE pops up a dialog that says “Do you want to save this file, or find a program online to open it?”

    Since others in my office do not have this problem, I think that I’ve somehow broken the setup of my computer. I do remember playing about with Registry settings in an attempt to make the .php problem go away.

    In any case, I’m now pretty sure it’s not a problem with IAT.

  14. teemu
    Posted 2007-08-06 at 1:31 am | Permalink

    I found the solution to my problem. It was nothing to do with It’s All Text, any other Firefox plugin, the MIME types being served, or anything else to do with our web server. The problem was that in my preferences for our internal wiki (which runs on MediaWiki software), in the “Editing” tab, I had “Use external editor by default” checked. I didn’t have that checked in my preferences for Wikipedia, so editing a whole page worked there.

    I have no idea why I didn’t get this error when editing a section of a page in our wiki, but after unchecking that box and saving my preferences, everything works.

    One more thing: It’s All Text is a great plugin!

  15. Boudewijn Pelt
    Posted 2007-08-07 at 6:33 am | Permalink

    Hi,
    Like the plug-in, but is not quite what I am looking for.
    A common problem with text entry fields is that you get an error the moment you submit.

    But with this plug-in, if you press the edit button again you still loose the text you typed.
    The specific case I am talking about is adding comments using the Jira bug tracker from http://www.atlassian.com.

    A solution would be not to replace an existing temporary file by an empty one. Just open the existing one.
    You can always clear it in the editor you are using.

  16. Posted 2007-08-07 at 12:53 pm | Permalink

    Boudenwijn Pelt:

    Currently, you can leave the editor open and if you revisit the same page, then any changes you make will update the textarea.

    I can see adding an option to never empty the text file, though.

    Ciao!

  17. spoko
    Posted 2007-08-14 at 7:46 am | Permalink

    I really like the add-on, but I’ve found that it messes up some “special” characters (such as the em dash, — ). If I copy the text from the text editor and manually paste it into the web site, those characters copy in just fine. If I save the text-editor file and let your add-on do the text insertion on the page, those characters get replaced with a funky reverse-question-mark-set-in-a-diamond. Obviously, copying and pasting from the text editor is 2/3 of what this extension is supposed to avoid.

    Otherwise, I’m happy with it. Keep up the good work, please.

  18. Posted 2007-08-14 at 12:14 pm | Permalink

    spoko:

    Thanks! Regarding the special characters being munged, this is because your editor and IAT don’t agree on the character set. By default, IAT uses UTF-8. If your editor doesn’t handle that or if your editor assumes it’s some other charset, then you will get the behavior you described.

    Try changing the charset to match what your editor thinks it is. Possibly iso-8859-15 or some windows proprietary charset (I don’t use windows).

    Ciao!

  19. spoko
    Posted 2007-08-14 at 1:11 pm | Permalink

    Sorry—now I see that in the FAQ. I don’t know what character set my editor uses by default (or how to change its default), but I did set a quick shortcut to change the current working document to UTF-8, and that does the trick. Carries those across beautifully.

    OK, now this extension rocks.

  20. mish
    Posted 2007-08-15 at 11:05 am | Permalink

    Just to add another vote for the keyboard shortcuts (I have seen that it’s on your todo list).

    But thank you for your work, and I’ll look forward to trying it again when you have had time to do the keyboard shortcut. (carrying on with mozex for now …)

  21. Priyadarshan
    Posted 2007-08-23 at 11:09 am | Permalink

    Excellent extension. Thank you very much for it!
    PS: I do like the yellow animation feature a lot. That guy that wants an option to take it away must surely be joking.

  22. Posted 2007-08-23 at 2:25 pm | Permalink

    @Priyadarshan

    Thank you!

    ‘sa’ uses It’s All Text!, so they must have excellent taste; I’m sure there is an excellent reason for not wanting the yellow fade. :-D

    Ciao!

  23. Posted 2007-08-23 at 3:54 pm | Permalink

    Hi,

    I am using IAT on my G4 Imac.

    Os x 10.4.10

    Firefox 2.0.0.6

    Greasemonkey is disabled.

    I installed the iat.sh shell script, and when I type

    open -a /Applications/TextWrangler.app $*

    Textwrangler opens right up. However, clicking on the IAT edit button does not invoke the editor. Nor does ctrl-click and selecting IAT from the contextual menu.

    IAT is configured to point directly at the script:

    /Users/englishdepartment/iat.sh

    Any suggestions? Thank you for creating something cool for the world to use.

  24. Posted 2007-08-23 at 4:25 pm | Permalink

    I just pointed the preferences at the Pico editor clone nano: /usr/bin/nano

    which is a simple unix editor. IAT is not working with that as well. I wonder what I am doing wrong…

  25. Posted 2007-08-23 at 4:36 pm | Permalink

    Also, I disabled all of my firefox plugins, restarted firefox, and it still isn’t working. Hmmm.

  26. Posted 2007-08-23 at 5:46 pm | Permalink

    Mark Crane:

    Huh… odd. Is there a dialog popping up saying that it couldn’t run the editor?

    If not, can you look for any error messages in the JavaScript Error Console (or Firebug if you have that installed)?

    You may have to set javascript.options.strict to true in about:config to get more messages.

    Ciao!

  27. Posted 2007-08-23 at 6:57 pm | Permalink

    Hi. I set Java options to strict, installed firebug, cleared the console then tried to use IAT and no error messages were generated. None were generated in the regular console either. I’m giving up at this point after 3.5 hours, but thank you!

    p.s. mozex isn’t working either.

  28. Posted 2007-08-23 at 7:34 pm | Permalink

    Mark Crane:

    One last check…. Hum… actually, now that I think about it, nano can never work because it runs in a terminal, unless the Mac OS X opens a terminal for you. You would have to have the iat.sh script open a terminal and then run nano. That’s beyond my Mac OS X knowledge.

    I don’t know the other editor you mention, does it also open in a terminal?

    Ciao!

  29. Boudewijn Pelt
    Posted 2007-08-27 at 10:25 am | Permalink

    There is a conflict with Crucible:
    http://www.atlassian.com/software/crucible/
    When editing comments the Crucible “Post” button does not work anymore while It’s All Text! is active.
    You can work around it by clicking “Save As Draft” instead and then clicking “Post”.

  30. Posted 2007-08-27 at 11:22 am | Permalink

    Boudewijn Pelt:

    Can you give the exact steps to reproduce that problem on their demo? I tried to recreate the problem and it works for me. :-/

    Ciao!

  31. Boudewijn Pelt
    Posted 2007-08-29 at 6:11 am | Permalink

    Ok. I see what you mean. The first comment does not have the Post button blocked.
    But then the “Defect” checkbox is blocked.

    Login on the review site. http://demo.cenqua.com/cru/CR-11
    Click “/trunk/libgaim/example/nullclientc”
    Click line 17.
    type some text.
    Click the Defect checkbox: it does not work, the checkbox is blocked.
    But you can still click on the “Defect” text.
    Click “Post”
    Click “Reply”
    Type some text.
    Now the “Post” button is blocked.

  32. Posted 2007-08-29 at 9:46 am | Permalink

    Boudewijn Pelt:

    Oooh….that’ll be a hard one to fix. The work around is to use the keyboard:

    1. Click on the text box.
    2. Press tab once to get to the checkbox.
    3. Press space to check the box.

    I’ll see if I can work up a test case for it. But detecting that a checkbox is below the button is hard. :-/ In addition, the button is in the wrong place for some reason. I’ll have to look at the DOM to see what’s going on.

    Thanks for reporting this.

    Ciao!

  33. lahvak
    Posted 2007-08-30 at 11:04 am | Permalink

    Docwhat, first of all I want to thank you for this great extension! I got
    spoiled by years of using Lynx as my primary browser. Lynx had an external
    editor feature build in for quite a while, but I couldn’t find a good graphical
    browser with the same feature for a long time. Since I am also a vi junkie, I
    always end up inserting bunch of strange character combinations in textareas,
    or loosing all typed text after accidentally pressing ESC. I have just
    discovered tour extension and I can finally do what I used to do in the good
    old Lynx days, edit textareas using vim.

    However, there is one thing missing for me. I use the vimperator extension,
    which lets me for most time do all my browsing with keyboard only, but there is
    no way to start the external editor it It’s all text! without a mouse. I would
    really really like to add my voice to the people asking for a hotkey support.
    That would make It’s all text! just perfect!

  34. Posted 2007-08-31 at 3:32 pm | Permalink

    Thanks, thanks, thanks, thanks… for this great extension!

  35. err
    Posted 2007-09-04 at 1:22 pm | Permalink

    First, very nice.

    A Few things
    1) I’m using gvim on windows, so path is like “C:\stuff\gvim.exe”. This starts up gvim async (it forks). I thought I’d try starting it sync, with the ‘-f’ option, and see if I could detect any differences in “IAT” behavior. In particular I was wondering if it might affect the following issues. I tried “c:\stuff\gvim.exe -f”, but that failed. I guess if you want options you need to set up a script. I made a iat.cmd and put “c:\stuff\gvim.exe -f” in it, it starts the editor, but not with the right file. I don’t know the windows equivelent of “$*”. Also, when it started there was that anoying command.com window as well.

    2) accumulation of temp file, any issues here? They don’t seem to go away (at least not very quickly). I thought if the editor started up sync, you would know when the editor exitted and be able to handle the delete.

    3) While the editor is active, if I modify the textArea through the browser… Again, if IAT knew when the editor exited, maybe could warn that changes made would be lost.

    Thanks a lot for this extension.

  36. Posted 2007-09-04 at 1:35 pm | Permalink

    err;

    Unfortunately, FireFox does not report back when a process exits. Otherwise, I could fix a problems I have to work around. So the original way you invoked gvim was correct. You don’t need the -f.

    Regarding the temp files, they should go away either: when the browser exits or (failing that) after aging a week (I think it was a week. Maybe a day.)

    I don’t delete them faster because you can keep your editor open and revisit the same page and make changes by editing the old file. :-) Assuming that each edit doesn’t get a new URL (depends on the site).

    Ciao!

  37. Alex
    Posted 2007-09-14 at 10:03 am | Permalink

    Cool extension – thanks!

    I’m using it with TWiki which also puts buttons in almost exactly the same place as the blue edit button. Makes it tricky to hit (or even see!). Would it be possible to have an option to display the button e.g. on the left or in the middle instead of on the right?

  38. Posted 2007-09-14 at 1:56 pm | Permalink

    Alex:

    Yeah, this is a problem.

    I’m thinking about making the button disappear when the mouse isn’t over a textarea and the textarea isn’t in focus.

    So in your case, you just click outside the textarea someplace (to remove the focus) and the edit button goes away entirely, leaving you free to click the button underneath.

    Ciao!

  39. Posted 2007-09-15 at 6:33 pm | Permalink

    Hi, this is an excellent plugin! Keep up the good work!

    I’m a heavy vim user and also use the vimperator plugin to surf the web, thus the only thing I need to use the mouse for is to start that editor ;-)
    So as many before me I once again say: Pretty please with sugar on top, add a hotkey, any hotkey, no need for it to be configurable, just add it soon. :-)

  40. Fan
    Posted 2007-09-26 at 10:10 pm | Permalink

    Can this be updated to append in same editor window until window is closed?

  41. Posted 2007-09-27 at 9:30 am | Permalink

    Fan:

    Do you mean, the file in the editor would be updated from the browser window? That is, it would be synchronized in both directions?

    What happens when a change in the browser conflicts with a change in the editor?

    If one (the editor or the browser) was given priority, then it’s not so hard.

    Do you have a use case?

    Ciao!

  42. teemu
    Posted 2007-09-27 at 7:42 pm | Permalink

    I’d like to add my voice in support of the yellow animation. It’s reassuring to see it, and to know that the textbox has changed according to what’s in the editor.

  43. RichiH
    Posted 2007-10-01 at 10:22 am | Permalink

    As requested, I am putting my comments in here, as well :)

    1) IAT should try to execute the editor within a shell, not call a binary directly. As it is, it is impossible to pass parameters to the executable. A shellscript is a working but kludgy work-around.

    2) The position of the edit button should be changeable.

    Thanks a lot for your script! :)

  44. Posted 2007-10-01 at 10:33 am | Permalink

    RichiH:

    Thanks for the feedback. I’m enjoying talking to you on IM…

    Yeah, it’d be really nice to have something like that. The problem is that shells and the exec() function on different platforms work differently. FF doesn’t expose execl().

    I’ve been thinking of adding an advanced option or something where you are assumed to know how your local system works. That way people who don’t know (or don’t care) can just use the current behavior.

    The letting people choose corners is a good idea. I’m wanting to change the way the edit button appears and disappears anyway. It gets in the way sometimes.

    Thanks again.

    Ciao!

  45. Posted 2007-10-01 at 9:33 pm | Permalink

    Comments are closed here. Post on the v0.8.0 thread instead.

    Ciao!

3 Trackbacks

  1. By nur Bahnhof » links for 2007-08-04 on 2007-08-04 at 1:19 pm

    [...] It’s All Text! v0.6+ « Archive « The Doctor What (tags: firefox plugins usability writing vim) [...]

  2. By It’s All Text! on 2008-03-24 at 10:34 pm

    [...] I couldn’t get it to work, however! I read in the creator’s blog about how he seemed to solve the problem, but I still had to type the solution by hand into the preferences, as mentioned here. So, [...]

  3. [...] It’s All Text | Sitio del desarrollador [...]