Tutorial :What is a good javascript editor for editing custom DSL code?



Question:

I'm looking for a nice / customisable editor to put on a web page for editing scripts for a custom DSL. Ideally with syntax highlighting (and intellisense would be great! )

Anyone know of anything suitable?


Solution:1

For syntax highlighting, look at EditArea. Intellisense could be written as a plugin.


Solution:2

maybe you should have a look at codemirror:

http://codemirror.net/

it's "just" an editor-component and you will probably have to put some work into it. but it's easy to enhance and integrate it.


Solution:3

You should take a look at Bespin. You have a good description here: http:// mozillalabs.com/bespin/2010/01/15/bespin-embedded-0-6-released-now-in-two-great-flavors/

It has a full support for being embedded. See the embedding doc : https:// bespin.mozilla.com/docs/embedding/index.html

You can write a custom syntax highlighting plugin pretty easily if needed. You can probably fork and adapt one of the built-in syntax highlighters. The editor itself and its plugins are written in Javascript.

The project is aimed at being a complete web-based & collaborative code editor, so intellisense-like features should make their way in soon if they're no alreay present.


Solution:4

The successor of the Mozilla Skywriter (Bespin) project is ACE: http://ace.ajax.org/


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »