What we usually do is create a common.js and common.css files and include them in the dashboard. While this works very nicely, it has one obvious drawback - we can't edit them through CDE, losing the ability to do remote maintenance / development.
Well, not any more!
We recently integrated Ace editor into CDE. Ace is a merge of 2 projects: Ace and Mozilla's Bespin (which was used as the CDA editor), lately known as Skywriter. You can take it for a quick test drive here.
It has a lot of interesting features:
- Syntax highlighting
- Auto indentation and outdent
- 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
Adding a resource:
Choosing a folder:
Creating a new file:
Editing the code: