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.

  • what type of editor are you looking? – EL Yusubov Sep 26 '12 at 15:02
  • With the lack of research, effort, and code, this question would be unsuitable for Stack Overflow in its current state. – George Stocker Sep 26 '12 at 17:34
  • @ElYusubov,,,just a simple vi-like text editor – cobie Sep 26 '12 at 19:47
  • A browser\text editor is the future! I'm searching for this but I think we should desing a new Browser for do that plugin extension are quite limited... Great qestion! – G M Oct 6 '13 at 12:59

If you're looking to implement a code editor in the browser it's worth looking at the CodeMirror and the Ajax ACE projects. ACE is more fully featured, CodeMirror is lighter weight.

If nothing else, they should demonstrate that doing this well is a far from trivial job!


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.

You may also look and select from variety of jQuery based text-editors from - 10 jQuery and non-jQuery javascript Rich Text Editors


Writing an editor to run inside a browser is not that different.

Use Javascript. Use a <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 div, too.

Use onkeydown, onclick and other such event handlers to react on user actions.

The rest is up to you.

Not the answer you're looking for? Browse other questions tagged or ask your own question.