JSVI – Javascript Vi for web forms

Technology

jsvi_20080628.jpg

There are so many WYSIWYG editors for html forms, it’s about time someone put together a decent web version of the Vi editor. JSVI is written in Javascript and seems to be fairly cross-browser compatible. With a few tweaks to your code, you can now make any textarea behave exactly like Vi. How cool is that?

To use it, download the GPLed vi.js file from the link below, include it in your html document, and then add an onfocus=”editor(this);” to any textarea that you want vi enabled. If your textarea contains any preset information, the text will be loaded into the editor when the field is clicked. Saving the file with :wq will exit the editor and store the changes back in the input field.

Somewhere there must be a unix blog or forum that will adopt this for their submission and comment fields. Shame on them if they don’t. That is, unless they are waiting for the emacs version.

JSVI – VI in JavaScript (demo)
Download vi.js

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

Tagged
Discuss this article with the rest of the community on our Discord server!

ADVERTISEMENT

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK