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.
I’ve forked the project and added some bug fixes https://github.com/jcubic/jsvi you can also submit bug reports. The original is not maintained.
Comments are closed.