views:

40

answers:

2

Hi,

i seeking any inline editing solution for the web site.

Suppose, i have an article, displayed on the page.

To edit it, i click the "edit" button and everything, displayed in article gets "contentEditable" attribute and i can edit text, format is, as i want to, insert images etc.

Is there any solution (free or commertial) to do this on Rails or PHP-driven web site ?

A: 

I'm not sure if something exists that's not part of a full fledged CMS, but you can build your own using a javascript libary (say, jQuery) and a rich editor component (say, CKEditor).

A very high overview of this:

  • have the text you want to edit in a textarea inside a form, hidden or not.
  • bind your edit button's onclick event to some javascript that will initiate the editor component on the textarea that already holds the text you want to edit.
  • edit some, then hit your form's submit button which should lead to a script that saves your form, via AJAX inline or regular POST.
Fanis
+1  A: 

You could try Aloha Editor, though it looks like you'd have to buy a license if you want to use it in a commercial product.

robertc