Web-based source code editor
Table of contents
What we want
- http://en.wikipedia.org/wiki/Comparison_of_JavaScript-based_source_code_editors
- With realtime Syntax highlighting
- Compatible with our License
- Support for PHP, JavaScript, HTML, CSS, MySQL, Smarty, YAML so we can Dogfood within Tiki.
- Support for other popular languages (Python, Java, etc.)
- Possible to add syntaxes, such as Tiki markup so we can do something like WikiWizard
- Ideally will open the door to Web commits
- To find an open source project happy to be integrated in Tiki and that could help us.
Todo
-
discuss- investigate project stats on https://www.ohloh.net/tags/source/syntax_highlighter
-
pickCodeMirror has been picked - contact project
- integrate tightly
- add syntaxes
Re-assess new options for 9x
ACE
ACE - Ajax.org Cloud9 Editor (LGPL'd)
http://ace.ajax.org/
Ace is a standalone code editor written in JavaScript. Their goal is to create a web based code editor that matches and extends the features, usability and performance of existing native editors such as TextMate, Vim or Eclipse. It can be easily embedded in any web page and JavaScript application. Ace is developed as the primary editor for Cloud9 IDE and the successor of the Mozilla Skywriter (Bespin) Project.
Ace is a community project. We actively encourage and support contributions. The Ace source code is hosted on GitHub. It is released under the Mozilla tri-license (MPL/GPL/LGPL).
See its live demo:
http://ace.ajax.org/build/kitchen-sink.html
Features
- Syntax highlighting
- Auto indentation and outdent
- An optional command line
- Work with huge documents (100,000 lines and more are no problem)
- Fully customizable key bindings including VI and Emacs modes
- Themes (TextMate themes can be imported)
- Search and replace with regular expressions
- Highlight matching parentheses
- Toggle between soft tabs and real tabs
- Displays hidden characters
- Highlight selected word
How-to embed in a web page (API):
Why a new editor?
It doesn't seem desirable to replace the work done already to have codemirror integrated in Tiki 7.x and 8.x (and money invested in developers' time), but there are still a few things missing to have a source-code editor in Tiki really useful with real scripts and auto-indented complex logic (for loops, if-then-else clauses, etc).
We might follow the path to slowly request having new features added to codemirror, or, if there was a floss solution already developed with all the needs for a web-based source code editor, we might prefer using this alternative to codemirror. This floss solution might be ACE (Ajax.org Cloud9 Editor), since in 2012 it seemed stable and featureful-enough for this need to give it a try.
For this reason, it might be wise to add a new option under the "experimental" admin panels like:
- ( ) use ACE to replace codemirror in wiki page templates"
This might try the editor in Tiki 9.x, without touching all the logic added for codemirror and most textareas, so regressions should be minimal. And if proven to be fast/cheap-in-resources/etc, it might be a good proof-of-concept that the change is desirable for later releases... (Tiki 11, Tiki12, ...)
Related:
Bugs
- Fullscreen needs to auto-detect buttons that are found below on the page if any (like wiki: save, preview, etc) and add them if not, make sure if buttons are hidden, they are not added.
Feedback from 8.x
- False positives
- Strike trough syntax here: http://dev.tiki.org/Semi-automatic+merging+period
- PluginCode is missing a way to have colors "none" (ex.: when it doesn't have a syntax like sql)
Feedback from 7.x experimental
[+]Robert & Marc
7.x
-
PluginCode: CodeMirror is doubling up(seems good to me - jb 110714) -
Upgrade 7.x to CodeMirror 1.0 to get bug fixes(done jb 110714)
Trunk
-
Upgrade trunk to CodeMirror2 to get new goodies- Use YAML parser for profiles.tiki.org
- the 8 .js files should be minified
- Make strings translatable
Related links
- http://techmix.net/blog/2010/08/20/best-online-source-code-editor-collection-must-have-for-a-developer/
- http://smashinghub.com/40-useful-online-applications-for-web-designers-and-developers.htm
- Syntax highlighter
- Syntax highlighting
- PluginCode
- web-based code editor
- Code Mirror
- CodeMirror
- webeditor
- web editor

Last Comments