Skip to content

Commit

Permalink
[readme] Update API and Usage
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelklehr committed Oct 8, 2016
1 parent ed005db commit 85a98fa
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,24 @@
## Install

```
npm install --save gulf gulf-editor-contenteditable dom-ot
npm install --save gulf-editor-contenteditable
```

## Usage

```
const domOT = require('dom-ot')
const ContenteditableDocument = require('gulf-editor-contenteditable')
var editable = document.querySelecor('#doc[contenteditable]')
var doc = new ContenteditableDocument({
storageAdapter: new gulf.MemoryAdapter
, ottype: domOT
, editorInstance: editable
editorInstance: document.querySelecor('#doc[contenteditable]')
})
```

## API
### class ContenteditableDocument({editorInstance:HTMLElement,...}) extends gulf.EditableDocument
* `contenteditable` -- a contenteditable Element to be wired up with gulf
* `storageAdapter` -- a gulf storage adapter
* `ottype` -- the OT type, with this binding you'll want `dom-ot`
* `editorInstance` -- a contenteditable Element to be wired up with gulf
* `storageAdapter` -- (optional) a gulf storage adapter. Default is `gulf.MemoryAdapter`
* `ottype` -- (optional) the OT type to use. With this binding the default is `dom-ot`


## Legal
Expand Down

0 comments on commit 85a98fa

Please sign in to comment.