Make Futon an Extensible/Embedabble Authoring Tool

Details

Description

For folks wishing to build stackless web applications on top of couchdb, futon is good place to start. In my own work, I've attempted to integrate futon into my application to create an app that hosts its own development environment much the same way as wikis combine authoring as well as presentation. I believe the seaside smalltalk framework takes this approach as well.

Please consider evolving futon to become more extensible and embeddable.

stackless web application : An application that requires little more than HTTP, HTML, and JavaScript.

I'm also interested in making Futon more extensible. It would be really nice to have plugins that could inject arbitrary bits of functionality into Futon, e.g. TinyMCE, date pickers etc.

I'm thinking Futon could load some arbitrary JavaScript from a specially-named document in each database, e.g. with id "_utils/Futon". This would be loaded after the Futon JavaScript stuff, so the latter could be overridden. The Futon JavaScript stuff would need to be restructured slightly to use callbacks where appropriate.

Jason Davies
added a comment - 04/Jan/09 18:28 I'm also interested in making Futon more extensible. It would be really nice to have plugins that could inject arbitrary bits of functionality into Futon, e.g. TinyMCE, date pickers etc.
I'm thinking Futon could load some arbitrary JavaScript from a specially-named document in each database, e.g. with id "_utils/Futon". This would be loaded after the Futon JavaScript stuff, so the latter could be overridden. The Futon JavaScript stuff would need to be restructured slightly to use callbacks where appropriate.
To use TinyMCE as an editor you could then do something like this:
var old_value_callback = value_callback;
function value_callback(doc, key) {
if (doc.type == 'blog_entry')
{
if (key == 'content') return showTinyMCE(doc[key]);
if (key == 'pub_date') return showDatePicker(doc[key]);
}
return old_value_callback(doc, key);
}
There are security considerations with relying on a specially-named document in each database if you replicate an untrusted database onto your CouchDB instance, and then run Futon on it.
I'd be interested in seeing Rob's work on this.