14

Recently I discovered it's possible to have syntax-highlighting in a <textarea> using JavaScript.

Are there Open Source libraries which also support auto completion? I'd like to make a simple online editor for HTML/CSS templates.

Preferably, the completion is can be extended, so I can add custom rules.

vdboor
  • 21,914
  • 12
  • 83
  • 96
  • Sounds like a cool idea, but not very practical yet. I guess you could utilize HTML5 to cache most of it for off-line use. – xil3 Jan 14 '11 at 15:50
  • @xil3: what would I have to cache offline? The code completion definitions? They could be inlined as JSON – vdboor Jan 21 '11 at 16:35
  • so someone would always need an internet connection to use the IDE? Even if the code completion definitions were in-line, that would need to be cached somewhere in order to access this off-line. – xil3 Jan 21 '11 at 16:47
  • @xil3, ah I see. yes HTML5 makes sense in such cases – vdboor Jan 22 '11 at 00:18

3 Answers3

6

You should check this wikipedia page on javascript based code editors. It lists the MDK-Editor as one that supports auto-completion for html, css and javascript. You can see a demo here.

Elian Ebbing
  • 18,779
  • 5
  • 48
  • 56
3

CodeMirror has ability to support autocompletion

Eran Medan
  • 44,555
  • 61
  • 184
  • 276
0

Mozilla Labs has Skywriter (This project is no longer active) which is a browser based IDE. I don't know if it has code completion (I couldn't find it) though.

Mike Cluck
  • 31,869
  • 13
  • 80
  • 91
minichate
  • 1,914
  • 13
  • 17
  • 1
    Skywrite has been renamed to [Ace](http://ace.ajax.org/), the editor which is used in the [Cloud9 IDE](https://c9.io/). – raju-bitter Aug 17 '12 at 09:48