diff --git a/Readme.md b/Readme.md index 8897212b..0841f109 100644 --- a/Readme.md +++ b/Readme.md @@ -35,6 +35,37 @@ Ace is a community project. We actively encourage and support contributions. The git clone git://github.com/ajaxorg/ace.git git submodule update --init --recursive +Embedding Ace +------------- + +Ace can be easily embedded into any existing web page. The Ace git repository ships with a pre-packaged version of Ace inside of the `build` directory. The same packaged files are also available as a separate [download](https://github.com/ajaxorg/ace/downloads). Simply copy the contents of the `src` subdirectory somewhere into your project and take a look at the included demos of how to use Ace. + +The easiest version is simply: + +
some text
+ + + +To change the theme simply include the Theme's JavaScript file + + + +and configure the editor to use the theme: + + editor.setTheme("ace/theme/twilight"); + +By default the editor only supports plain text mode. However all other language modes are available as separate modules. After including the mode's Javascript file + + + +the mode can be used like this: + + editor.getSession().setMode(new JavaScriptMode()); + Running Ace ----------- diff --git a/build/Readme.md b/build/Readme.md index 8897212b..0841f109 100644 --- a/build/Readme.md +++ b/build/Readme.md @@ -35,6 +35,37 @@ Ace is a community project. We actively encourage and support contributions. The git clone git://github.com/ajaxorg/ace.git git submodule update --init --recursive +Embedding Ace +------------- + +Ace can be easily embedded into any existing web page. The Ace git repository ships with a pre-packaged version of Ace inside of the `build` directory. The same packaged files are also available as a separate [download](https://github.com/ajaxorg/ace/downloads). Simply copy the contents of the `src` subdirectory somewhere into your project and take a look at the included demos of how to use Ace. + +The easiest version is simply: + +
some text
+ + + +To change the theme simply include the Theme's JavaScript file + + + +and configure the editor to use the theme: + + editor.setTheme("ace/theme/twilight"); + +By default the editor only supports plain text mode. However all other language modes are available as separate modules. After including the mode's Javascript file + + + +the mode can be used like this: + + editor.getSession().setMode(new JavaScriptMode()); + Running Ace -----------