I think this is awesome and really like the "double-click & edit" feature! I'm sure this will be of great use to many.
Good on you! Mart :) On Jul 8, 12:00 pm, Ross Peoples <[email protected]> wrote: > This will be my second public plugin release. I will put it up on BitBucket > soon, but for now, I thought I would introduce a new plugin I've been > working on. Sometimes you just need a WYSIWYG editor. This plugin integrates > CKEditor into web2py. It acts much like the Auth object in its usage. For > example, in your model, you need to import and initialize it: > > from plugin_ckeditor import CKEditor > ckeditor = CKEditor(db) > ckeditor.define_tables() > > It's most basic usage is to assign it to a Field widget: > > db.define_table('content', > Field('title', length=255), > Field('public', 'boolean', default=True), > Field('text', 'text', widget=ckeditor.widget) > ) > > The CKEditor now automatically becomes available every time SQLFORM is used. > This is a screen shot of it in action: > > <https://lh4.googleusercontent.com/-HLLFte_tXCw/ThclwgF-TtI/AAAAAAAAAC...> > > This is great by itself, however, I decided to take it a few steps further. > First of all, also supports edit in place. This is a test page to > demonstrate: > > <https://lh4.googleusercontent.com/-bsWPwiuQg20/Thcl_C0sraI/AAAAAAAAAD...> > To make this content editable, all it takes is the following line in the > view: > > {{=ckeditor.edit_in_place('.editable', URL())}} > > This makes any element with the 'editable' class editable in place. It also > requires a URL to save the data to when the save button is clicked. Here's > what it looks like in edit mode: > > <https://lh3.googleusercontent.com/-9kv2lFa4JjA/ThcmcWAGF5I/AAAAAAAAAD...> > It is all AJAX enabled, spellchecks as you type, and it's fast. Edit in > place is another great feature, but I also took it a step further than that > and integrated upload and browse functionality for images and Flash movies: > > <https://lh4.googleusercontent.com/-XtkEW2sXXyU/Thcm-IwkZ8I/AAAAAAAAAD...> > > <https://lh3.googleusercontent.com/-mBjk0bs_-Z8/ThcnEixpCDI/AAAAAAAAAD...> > > <https://lh5.googleusercontent.com/-M4ddg9Dz9Kg/ThcnH0dubEI/AAAAAAAAAD...> > > <https://lh4.googleusercontent.com/-8DKGzp3qqbs/ThcnV3GNCOI/AAAAAAAAAD...> > The upload and browse functionality is all taken care of by the plugin and > does not require you to do anything on your end once you have initialized > the plugin in your model as demonstrated above. > > I used the following resources in developing this plugin, so a special > thanks to the authors of these for providing the ground work required to > make this possible: > > http://www.web2pyslices.com/main/slices/take_slice/18http://www.bitsntuts.com/jquery/ckeditor-edit-in-place-jquery-plugin > > I have a couple other issues to resolve before I post the code, but I'd love > to get some feedback to see if the community finds this plugin useful.

