Textarea is the Most Important Editor
Consider for a moment the html form element for entering multi-line text:
<textarea>...</textarea>
Not much to look at, is it?
Hard to believe, but this little widget is fast supplanting the word processor as the tool with which most of humankind’s writing is done. Just as the word processors supplanted the typewriter, the typewritter the pen, and the pen the quill.
Think of all the places where one writes using textarea. Blogging, Writely and friends, site comments, feedback forms, message forums, GMail, and user profiles on community sites like Tribe, to name a few. Even the internal tool I use at work for creating project designs involves writing in a textarea.
What’s astonishing, then, is just how lame the textarea widget is. I’m pretty sure that Notepad has it beat out for features and usability. Scary, that.
I think the attitude thus far - and my attitude until just recently - was that textarea is just a multi-line version of <input type=text>. If you were trying to use it for any serious writing, you’re doing it wrong.
Sure, you and I know that for any serious writing you should use a real editor, then cut-and-paste the results into a textarea. For example I’m writing this in vim, to later be pasted into the textarea of my blogging software. But this is a haphazard and error-prone approach. One can accidentally cut and pasted too much or too little, for example. And then what if you want to edit it? Back to the original text file, delete the contents of the text area, and then cut and paste again? Or edit in place in the textarea, the very thing we were trying to avoid to begin with?
People not in the know about text editing tools - that is to say, 99% of computer users - just muddle by with textarea. They don’t know any better, but that doesn’t mean they aren’t feeling the hurt. Improving textarea’s capabilities would make everyone’s lives better, not just power users.
The other thing that gets my goat is the quantity of time an energy put into javascript rich text editors. Countless web applications, realizing the importance of decent editing capabilities, have sought to create their own or integrate an open source rich text editor. A few notables including GMail (which includes the very important feature of autosaving drafts) and WordPress. But these tend to be quirky, slow to load, and difficult to make work cross-browser. More significantly though, is that the application developers are spending huge amounts of time developing and maintaining a method for text entry, which seems like massive duplicated (and thus wasted) effort to me.
Everyone needs to have decent editing capabilities whenever they enter text. Why not just build it into the browser?
Partial attempts have been made, so I’ll mention a few of the notables here. One of the first ones that really caught my eye - and got me thinking about this - was automatic spellchecking, introduced into Konqueror a few years back. I was amazed by how much this improved my web writing experiences right away. Prior to having it, I think there was a small part of my brain that was constantly worried about whether I was spelling this or that word wrong and making myself look like an uneducated yokel. But any such thoughts were being squelched by the pragmatic concerns of cutting and pasting the text into Ispell or OpenOffice. So I had this constant little game of stress going on in my head - gone the moment Konqueror started highlighting my misspelled words in red. (I understand that Firefox 2 will be adding this feature as well.)
The honorable mention goes to KVim, which alas appears to be a dead project. This is a KPart (a pluggable component of the KDE architecture) that, when activated, caused most of KDE’s text widgets (including Konqueror’s textarea) to turn into a vim editor. Unfortunately the usefulness of this is limited for obvious reasons, but this is the closest browsers have ever come to having a non-sucky textarea widget.
More on the rich text side than the power-editing side is the clumsily-named Xinha Here Firefox plugin. Regrettably this is not inline; you have to right click and select “Open Xinha Here”, at which point a window pops up to offer an advanced editor. When you save, the results are pasted back into the textarea. More convenient than an external editor, but still far from the seamless solution we need.
So come on folks, let’s collectively come to grips with the fact that textarea is the most important editor of the future. Time to make it, you know, good.
July 7th, 2006 at 8:51 am
I think that no matter how good a textarea builtin to a browser is,
it will never be good enough. People don’t want to use
an editor that someone else thinks is good, they want to
use *their* editor. There needs to be a universal plugin API
for this so people can carry their favorite editor around not just
to browsers but to all applications that have a textarea-like
widget.
July 7th, 2006 at 11:03 am
Quite right. I’ve been thinking about this myself recently, and it would be a huge step forward if textbox widgets came with the power of a fully featured text editor ala vim.
How about creating a generic textbox widget in your favourite toolkit that would be capable of providing the context needed to embed any console based editor (vim, emacs and nano)? I’m sure that would be doable, and tons more flexible than writing a vim-like widget, an emacs like widget etc.
July 7th, 2006 at 11:18 pm
my preference - make it a preference! support a default mode with lame-o functionality as you describe, but let me set my textarea editor to emacs/vim/whatever if i want. how you embed these is another issue.
July 9th, 2006 at 6:33 am
I agree that textareas really could do with improvement; the sad thing is that people have been saying this for ages, and we still haven’t seen much done.
I really disagree with the two commenters that a good way to do this is to let users or developers embed their favorite text editor in a browser’s textarea; this is a geek solution, and won’t help the vast majority of browser users.
The reason you want to have your favorite text editor there is that you are familiar with it; but this won’t help you when you use a different browser, different computer, new version of your existing browser, etc. It also won’t help users who aren’t sophisticated enough to paste their text in from word or another external editor.
What would really be good is if the browser makers add needed features to their textarea widgets: saving (so you don’t lose an hour’s work by hitting a link or closing a window), spellchecking, maybe search, maybe rich text editing. If you get there features in a mainstream browser (by which I mean, one I use; by which I mean, Firefox), you’ll probably get them in the others (Safari, IE7, Opera, etc).
Once a better textarea is implemented in the browser, and other browsers play catch-up so it becomes ubiquitous, then you’ll start to expect it and rely on it, and it will be as familiar as your favorite text editor. Probably even more familiar, because you’ll use it even more…
July 11th, 2006 at 1:24 pm
Check out how Zope edits content. Its a utility called ZopeEdit which works on Windows, Mac OS X and *nix.
It requires you to register the .zope extension with your browser. Your browser launches the utility, which launches your favourite editor for the type of file. If it’s a jpg, it will launch Photoshop or your choice of jpeg editors. It it’s a Word document, it launches Word or StarOffice or OpenOffice whichever you prefer. If its a simple block of text, it will launch it into EditPlus, BBEdit, Notepad or whatever you prefer. ZopeEdit continuously checks if the files been modified/saved and/or closed and replaces the file on the server with the local temporary file you are editing.
This technique does have certain requirements that may not be available to all users who have had administrative restrictions placed on them ( such as the library ). This technique works, and works well, but is not a perfect solution. But how else can you get to use your favourite editor to edit your content without requirements like Zopes’.
August 11th, 2006 at 9:01 am
Have a look at the mozex plugin for Firefox - it allows you to edit the stuff in a text area with whichever editor you want. The downside is that the option to use your own editor is buried a level deep in the context menu
Would be nice to have a button that appears next to the text area - maybe I’ll suggest it to the mozex folk…
August 11th, 2006 at 9:29 am
Update on mozex - you can set hotkeys to bring up the editor
January 9th, 2007 at 8:06 pm
Hi,
You can check out ViewSourceWith plugin for Firefox, that might help you when editing textarea with an external editor.
January 20th, 2007 at 12:36 am
I forgot to comment here when I made a post about a few solutions to this, here.
June 23rd, 2007 at 6:04 am
[…] This guy agrees with me! […]