diff --git a/README.md b/README.md
index 21fd4496..b781ea3a 100644
--- a/README.md
+++ b/README.md
@@ -7,15 +7,16 @@
[![CDNJS](https://img.shields.io/cdnjs/v/react-ace.svg)](https://cdnjs.com/libraries/react-ace)
[![Coverage Status](https://coveralls.io/repos/github/securingsincity/react-ace/badge.svg?branch=master)](https://coveralls.io/github/securingsincity/react-ace?branch=master)
-A react component for Ace / Brace
+A set of react components for Ace / Brace
-[DEMO](http://securingsincity.github.io/react-ace/)
+[DEMO of React Ace](http://securingsincity.github.io/react-ace/)
+[DEMO of React Ace Split Editor](http://securingsincity.github.io/react-ace/split.html)
## Install
`npm install react-ace`
-## Usage
+## Basic Usage
```javascript
import React from 'react';
@@ -45,94 +46,14 @@ render(
## Examples
-* Checkout `example` directory for a working example using webpack.
-* [create-react-app](https://github.com/securingsincity/react-ace-create-react-app-example)
-* [preact](https://github.com/securingsincity/react-ace-preact-example)
-* [webpack](https://github.com/securingsincity/react-ace-webpack-example)
-
-
-## Available Props
-
-|Prop|Default|Description|
-|-----|------|----------|
-|name| 'brace-editor'| Unique Id to be used for the editor|
-|mode| ''| Language for parsing and code highlighting|
-|theme| ''| theme to use|
-|height| '500px'| CSS value for height|
-|width| '500px'| CSS value for width|
-|className| | custom className|
-|fontSize| 12| pixel value for font-size|
-|showGutter| true| boolean|
-|showPrintMargin| true| boolean|
-|highlightActiveLine| true| boolean|
-|focus| false| boolean|
-|cursorStart| 1| number|
-|wrapEnabled| false| Wrapping lines|
-|readOnly| false| boolean|
-|minLines| | Minimum number of lines to be displayed|
-|maxLines| | Maximum number of lines to be displayed|
-|enableBasicAutocompletion| false| Enable basic autocompletion|
-|enableLiveAutocompletion| false| Enable live autocompletion|
-|tabSize| 4| tabSize number|
-|value | ''| String value you want to populate in the code highlighter|
-|defaultValue | ''| Default value of the editor|
-|onLoad| | Function onLoad|
-|onBeforeLoad| | function that trigger before editor setup|
-|onChange| | function that occurs on document change it has 2 arguments the value and the event. see the example above|
-|onCopy| | function that trigger by editor `copy` event, and pass text as argument|
-|onPaste| | function that trigger by editor `paste` event, and pass text as argument|
-|onSelectionChange| | function that trigger by editor `selectionChange` event, and passes a [Selection](https://ace.c9.io/#nav=api&api=selection) as it's first argument and the event as the second|
-|onFocus| | function that trigger by editor `focus` event|
-|onBlur| | function that trigger by editor `blur` event|
-|onScroll| | function that trigger by editor `scroll` event|
-|editorProps| | Object of properties to apply directly to the Ace editor instance|
-|setOptions| | Object of [options](https://github.com/ajaxorg/ace/wiki/Configuring-Ace) to apply directly to the Ace editor instance|
-|keyboardHandler| | String corresponding to the keybinding mode to set (such as vim)|
-|commands| | Array of new commands to add to the editor
-|annotations| | Array of annotations to show in the editor i.e. `[{ row: 0, column: 2, type: 'error', text: 'Some error.'}]`, displayed in the gutter|
-|markers| | Array of [markers](https://ace.c9.io/api/edit_session.html#EditSession.addMarker) to show in the editor, i.e. `[{ startRow: 0, startCol: 2, endRow: 1, endCol: 20, className: 'error-marker', type: 'background' }]`|
-|style| | Object with camelCased properties |
-
-## Modes, Themes, and Keyboard Handlers
-
-All modes, themes, and keyboard handlers should be required through ```brace``` directly. Browserify will grab these modes / themes / keyboard handlers through ```brace``` and will be available at run time. See the example above. This prevents bloating the compiled javascript with extra modes and themes for your application.
-
-### Example Modes
-
-* javascript
-* java
-* python
-* xml
-* ruby
-* sass
-* markdown
-* mysql
-* json
-* html
-* handlebars
-* golang
-* csharp
-* coffee
-* css
-
-### Example Themes
-
-* monokai
-* github
-* tomorrow
-* kuroir
-* twilight
-* xcode
-* textmate
-* solarized dark
-* solarized light
-* terminal
-
-### Example Keyboard Handlers
-
-* vim
-* emacs
+Checkout the `example` directory for a working example using webpack.
+## Documentation
+
+[Ace Editor](https://github.com/securingsincity/react-ace/blob/master/docs/Ace.md)
+[Split View Editor](https://github.com/securingsincity/react-ace/blob/master/docs/Split.md)
+[How to add modes, themes and keyboard handlers](https://github.com/securingsincity/react-ace/blob/master/docs/Modes.md)
+[Frequently Asked Questions](https://github.com/securingsincity/react-ace/blob/master/docs/FAQ.md)
## Backers
diff --git a/docs/Ace.md b/docs/Ace.md
new file mode 100644
index 00000000..4de735fa
--- /dev/null
+++ b/docs/Ace.md
@@ -0,0 +1,45 @@
+# Ace Editor
+
+This is the main component of React-Ace. It creates an instance of the Ace Editor.
+
+## Available Props
+
+|Prop|Default|Type|Description|
+|-----|------|-----|-----|
+|name| 'brace-editor'| String |Unique Id to be used for the editor|
+|mode| ''| String |Language for parsing and code highlighting|
+|theme| ''| String |theme to use|
+|value | ''| String | value you want to populate in the code highlighter|
+|defaultValue | ''| String |Default value of the editor|
+|height| '500px'| String |CSS value for height|
+|width| '500px'| String |CSS value for width|
+|className| | String |custom className|
+|fontSize| 12| Number |pixel value for font-size|
+|showGutter| true| Boolean | show gutter |
+|showPrintMargin| true| Boolean| show print margin |
+|highlightActiveLine| true| Boolean| highlight active line|
+|focus| false| Boolean| whether to focus
+|cursorStart| 1| Number| the location of the cursor
+|wrapEnabled| false| Boolean | Wrapping lines|
+|readOnly| false| Boolean| make the editor read only |
+|minLines| | Number |Minimum number of lines to be displayed|
+|maxLines| | Number |Maximum number of lines to be displayed|
+|enableBasicAutocompletion| false| Boolean | Enable basic autocompletion|
+|enableLiveAutocompletion| false| Boolean | Enable live autocompletion|
+|tabSize| 4| Number| tabSize|
+|onLoad| | Function | called on editor load. The first argument is the instance of the editor |
+|onBeforeLoad| | Function | called before editor load. the first argument is an instance of `ace`|
+|onChange| | Function | occurs on document change it has 2 arguments the value and the event.|
+|onCopy| | Function | triggered by editor `copy` event, and passes text as argument|
+|onPaste| | Function | Triggered by editor `paste` event, and passes text as argument|
+|onSelectionChange| | Function | triggered by editor `selectionChange` event, and passes a [Selection](https://ace.c9.io/#nav=api&api=selection) as it's first argument and the event as the second|
+|onFocus| | Function | triggered by editor `focus` event|
+|onBlur| | Function | triggered by editor `blur` event|
+|onScroll| | Function | triggered by editor `scroll` event|
+|editorProps| | Object | properties to apply directly to the Ace editor instance|
+|setOptions| | Object | [options](https://github.com/ajaxorg/ace/wiki/Configuring-Ace) to apply directly to the Ace editor instance|
+|keyboardHandler| | String | corresponding to the keybinding mode to set (such as vim or emacs)|
+|commands| | Array | new commands to add to the editor
+|annotations| | Array | annotations to show in the editor i.e. `[{ row: 0, column: 2, type: 'error', text: 'Some error.'}]`, displayed in the gutter|
+|markers| | Array | [markers](https://ace.c9.io/api/edit_session.html#EditSession.addMarker) to show in the editor, i.e. `[{ startRow: 0, startCol: 2, endRow: 1, endCol: 20, className: 'error-marker', type: 'background' }]`|
+|style| | Object | camelCased properties |
diff --git a/docs/FAQ.md b/docs/FAQ.md
new file mode 100644
index 00000000..d14c1526
--- /dev/null
+++ b/docs/FAQ.md
@@ -0,0 +1,159 @@
+# Frequently Asked Questions
+
+## How do I use it with `preact`? `webpack`? `create-react-app`?
+
+Check out the example applications
+
+* [create-react-app](https://github.com/securingsincity/react-ace-create-react-app-example)
+* [preact](https://github.com/securingsincity/react-ace-preact-example)
+* [webpack](https://github.com/securingsincity/react-ace-webpack-example)
+
+
+## How do call methods on the editor? How do I call Undo or Redo?
+
+`ReactAce` has an editor property, which is the wrapped editor. You can use refs to get to the component, and then you should be able to use the editor on the component to run the function you need:
+
+```javascript
+const reactAceComponent = parent.refs.reactAceComponent;
+const editor = reactAceComponent.editor
+editor.find(searchRegex, {
+ backwards: false,
+ wrap: true,
+ caseSensitive: false,
+ wholeWord: false,
+ regExp: true,
+});
+```
+
+Similarly, if you want to redo or undo, you can reference the editor from the refs
+
+```jsx
+
+
+```
+
+## How do I set editor options like setting block scrolling to infinity?
+
+```javascript
+
+```
+
+## How do I add language snippets?
+
+You can import the snippets and mode directly through `brace` along with the language_tools. Here is an example below
+
+
+```javascript
+import React from 'react';
+import { render } from 'react-dom';
+import brace from 'brace';
+import AceEditor from 'react-ace';
+
+import 'brace/mode/python';
+import 'brace/snippets/python';
+import 'brace/ext/language_tools';
+import 'brace/theme/github';
+
+function onChange(newValue) {
+ console.log('change',newValue);
+}
+
+// Render editor
+render(
+ ,
+ document.getElementById('example')
+);
+```
+
+## How do I get selected text `onSelectionChange`?
+
+How you extract the text from the editor is based on how to call methods on the editor.
+
+Your `onSelectionChange` should look like this:
+
+```javascript
+onSelectionChange(selection) {
+ const content = this.refs.aceEditor.editor.session.getTextRange(selection.getRange());
+ // use content
+}
+```
+
+## How do I add markers?
+```javascript
+ const markers = [{
+ startRow: 3,
+ type: 'text',
+ className: 'test-marker'
+ }];
+ const wrapper = ();
+```
+
+## How do I add annotations?
+```javascript
+ const annotations = [{
+ row: 3, // must be 0 based
+ column: 4, // must be 0 based
+ text: 'error.message', // text to show in tooltip
+ type: 'error'
+ }]
+ const editor = (
+
+ )
+```
+
+## How do I add the search box?
+Add the following line
+
+`import 'brace/ext/searchbox';`
+
+before introducing the component and it will add the search box.
+
+## How do I add a custom mode?
+
+1. Create my custom mode class (pure ES6 code)
+2. Initialize the component with an existing mode name (such as "sql")
+3. Use the `componentDidMount` function and call `session.setMode` with an instance of my custom mode.
+
+My custom mode is:
+```javascript
+export default class CustomSqlMode extends ace.acequire('ace/mode/text').Mode {
+ constructor(){
+ super();
+ // Your code goes here
+ }
+}
+```
+
+And my react-ace code looks like:
+```javascript
+render() {
+ return
+
+
;
+}
+
+componentDidMount() {
+ const customMode = new CustomSqlMode();
+ this.refs.aceEditor.editor.getSession().setMode(customMode);
+}
+```
+
diff --git a/docs/Modes.md b/docs/Modes.md
new file mode 100644
index 00000000..9c2c3950
--- /dev/null
+++ b/docs/Modes.md
@@ -0,0 +1,39 @@
+# Modes, Themes, and Keyboard Handlers
+
+All modes, themes, and keyboard handlers should be required through ```brace``` directly. Browserify will grab these modes / themes / keyboard handlers through ```brace``` and will be available at run time. See the example above. This prevents bloating the compiled javascript with extra modes and themes for your application.
+
+### Example Modes
+
+* javascript
+* java
+* python
+* xml
+* ruby
+* sass
+* markdown
+* mysql
+* json
+* html
+* handlebars
+* golang
+* csharp
+* coffee
+* css
+
+### Example Themes
+
+* monokai
+* github
+* tomorrow
+* kuroir
+* twilight
+* xcode
+* textmate
+* solarized dark
+* solarized light
+* terminal
+
+### Example Keyboard Handlers
+
+* vim
+* emacs
\ No newline at end of file
diff --git a/docs/Split.md b/docs/Split.md
new file mode 100644
index 00000000..061a83cf
--- /dev/null
+++ b/docs/Split.md
@@ -0,0 +1,45 @@
+# Split Editor
+
+This allows for a split editor which can create multiple linked instances of the Ace editor. Each instance shares a theme and other properties while having their own value.
+
+## Available Props
+
+|Prop|Default|Type|Description|
+|-----|------|-----|-----|
+|name| 'brace-editor'| String |Unique Id to be used for the editor|
+|mode| ''| String |Language for parsing and code highlighting|
+|theme| ''| String |theme to use|
+|value | ''| Array of Strings | value you want to populate in each code editor|
+|defaultValue | ''| Array of Strings |Default value for each editor|
+|height| '500px'| String |CSS value for height|
+|width| '500px'| String |CSS value for width|
+|className| | String |custom className|
+|fontSize| 12| Number |pixel value for font-size|
+|showGutter| true| Boolean | show gutter |
+|showPrintMargin| true| Boolean| show print margin |
+|highlightActiveLine| true| Boolean| highlight active line|
+|focus| false| Boolean| whether to focus
+|cursorStart| 1| Number| the location of the cursor
+|wrapEnabled| false| Boolean | Wrapping lines|
+|readOnly| false| Boolean| make the editor read only |
+|minLines| | Number |Minimum number of lines to be displayed|
+|maxLines| | Number |Maximum number of lines to be displayed|
+|enableBasicAutocompletion| false| Boolean | Enable basic autocompletion|
+|enableLiveAutocompletion| false| Boolean | Enable live autocompletion|
+|tabSize| 4| Number| tabSize|
+|onLoad| | Function | called on editor load. The first argument is the instance of the editor |
+|onBeforeLoad| | Function | called before editor load. the first argument is an instance of `ace`|
+|onChange| | Function | occurs on document change it has 2 arguments the value of each editor and the event.|
+|onCopy| | Function | triggered by editor `copy` event, and passes text as argument|
+|onPaste| | Function | Triggered by editor `paste` event, and passes text as argument|
+|onSelectionChange| | Function | triggered by editor `selectionChange` event, and passes a [Selection](https://ace.c9.io/#nav=api&api=selection) as it's first argument and the event as the second|
+|onFocus| | Function | triggered by editor `focus` event|
+|onBlur| | Function | triggered by editor `blur` event|
+|onScroll| | Function | triggered by editor `scroll` event|
+|editorProps| | Object | properties to apply directly to the Ace editor instance|
+|setOptions| | Object | [options](https://github.com/ajaxorg/ace/wiki/Configuring-Ace) to apply directly to the Ace editor instance|
+|keyboardHandler| | String | corresponding to the keybinding mode to set (such as vim or emacs)|
+|commands| | Array | new commands to add to the editor
+|annotations| | Array of Arrays | annotations to show in the editor i.e. `[{ row: 0, column: 2, type: 'error', text: 'Some error.'}]`, displayed in the gutter|
+|markers| | Array of Arrays | [markers](https://ace.c9.io/api/edit_session.html#EditSession.addMarker) to show in the editor, i.e. `[{ startRow: 0, startCol: 2, endRow: 1, endCol: 20, className: 'error-marker', type: 'background' }]`|
+|style| | Object | camelCased properties |
diff --git a/example/index.html b/example/index.html
index fb3830ee..2259f389 100644
--- a/example/index.html
+++ b/example/index.html
@@ -12,6 +12,6 @@