Does anyone know of a good Javascript implementation of plaintext editing? I.e., exactly what textarea does, but less sucky. Find, find-and-replace, change textarea size, maybe a few other useful features; nothing too fancy. WYSIWYG is nice, but programmers live in a plain text world, and the application I'm writing at the moment is for programmers to use. I don't know how possible it is to fix textarea's suckiness (the most popular text editor ever, and yet such an exceptionally lame text editor), but I'd like to see what people have tried.
Take a look at these:
http://www.fckeditor.net/ http://www.wikiwyg.net/
Both are open source projects.
sean
# sean
But those are WYSIWYG editors, exactly what I wasn't looking for.
# Ian Bicking
Yes, it does help to read the entire entry before posting ;)
For doing local twiki work, I've pushed folks towards mozex:
https://addons.mozilla.org/extensions/moreinfo.php?id=40&application=firefox
Lets them run their own editor to edit data in a textarea field.
# Gary Godfrey
dont forget the ability to be able to use the TAB key, very annoying
What about syntax highlighting, which is not possible in textarea?
I know I'd appreciate it.
I've been meaning to write some javascript to at least allow tabs in textarea boxes - a superficial google brings up this IE example which can probably be extended.
http://aspalliance.com/346That would make using ReST or Markdown a little more tolerable in a text area.
In the end if I have to do a lot of editing, I really want to use a real editor, ideally my editor of choice. I used to use mozex on older versions of Firefox; your post inspired me to go looking for a working solution. Someone has updated mozex to run on newer versions of Firefox: https://nic-nac-project.de/~kaosmos/mozex107-en.html
here's the original parameter docs: http://mozex.mozdev.org/arguments.html
In Extensions, Preferences, set up vim:
/usr/X11R6/bin/urxvtc -e /usr/local/bin/vim %t
(sub whatever you use as a terminal for the first chunk of the command line)
or gvim:
/usr/local/bin/gvim %t
Click on the text area field when you've saved and closed the temp file et voila. Hey, I'm soaking in it right now!
<ESC>:wq'ingly yours...
A couple minor points
- Mozilla supports Find (though not replace) in TextArea, though Firefox doesn't.
- you can change the font/size of the TextArea via HTML tag, though obviously that's just a global improvement rather than one that people can customize.
Try this one:
Here's another one that uses some of TinyMCE's code: http://cdolivet.net/editarea/test.html