This is purely an exercise in self improvement and education.I am trying to implement an extension for a vi-like text editor within a browser. Can anyone give any advice or pointers as to where and how I should start?
closed as off topic by Jim G., Arseni Mourzenko, gnat, Blrfl, George Stocker Sep 26 '12 at 17:33
Questions on Software Engineering Stack Exchange are expected to relate to software engineering within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.
Short Answer: There are number of open-source text editors in the market. I would grab one and look at their code base. Improve it if you can, and share back with community.
For example, if you are using a CMS based framework system like Joomla, you may look at variety of editor tools here.
Writing an editor to run inside a browser is not that different.
<div> to render your buffer; when you update its contents or alter styles of elements inside it, the browser will repaint it for you. Quite probably, in a line-oriented vi-like editor it's convenient to have every line in a separate nested
onclick and other such event handlers to react on user actions.
The rest is up to you.