OscarGodson/EpicEditor — Issue #30: Allow custom .save() routes and other things
Author: OscarGodson
Created: 2012-02-25 02:29:48+00:00
State: open
Labels: Feature

The `.save()` method should be configurable in `.options()` with custom API routes so that `.save()` doesn't only save to localStorage but also some external API.

Something like...

```javascript
ee.options({
saving:{
create:'/api/create/',
read:'/api/read/',
update:'/api/update/'
remove:'/api/delete/',
saveInterval:500,
saveOnKeyUp:false
}
}).load();
```

Above sets up 4 custom routes for all your CRUD commands. It also turns off the default saving on keyup and turns on saveInterval which will automatically `.save()` every half a second while focused on the editor.

**NOTE:** the D in CRUD stands for delete, but delete is a reserved word in JS. Rather than making users remember to quote `'delete'`, we should use `remove` instead.

cc: @techwraith