Here is the "less-intrusive-I-can" patch to enable bespin editor in Futon database views page.
Implementation constraints :
- bespin can't have multiple instances
- bespin can't be enabled=>disabled=>enabled
I also met a bug on Google Chrome because CouchDB doesn't set a charset in HTTP response headers for database.html ... As a result I only succeded with BespinEmbedded 0.7.1.
Implementation details :
- created proxy functions to get and set map/reduce code to/from editor ( instead of $("#viewcode_map").val() ... )
- created bespin wrapper class