With the appearance of fancy inline editors on the scene and Dries mentioning inline editing as a priority at his keynote in Denver, discussion has already started on how the WYSIWYG module might broaden its horizons from the depths of the edit page to the view page and beyond. This issue is an attempt to aggregate discussions and lessons learned from various places so we can try to form a cohesive plan on how to tackle inline editing.

Related issues:
#1018352: Add editor: Aloha Editor

Members fund testing for the Drupal project. Drupal Association Learn more


seutje’s picture

Personally, I don't think inline editing belongs in WYSIWYG, because WYSIWYG is essentially nothing more than a tool to configure and attach editors to input formats. If we tie in the inline functionality, it would probably be a pain to support anything other than a fields with a format.

If we were to abstract that functionality in a separate module, which would do nothing more than grab the form for said entity, only show the field being edited, and handle submission, then it should automatically support any input field you throw at it, including fields with a format (and an editor attached by WYSIWYG).

This would make it a lot easier to support things like a date field with a date picker attached.

RobW’s picture

Sexy demos and Dries mention or not, I don't think that inline editing is necessarily a good fit [edit] as the primary way [/edit] Drupal manages content. I could see it being the main editor on a small brochure site and supplementing on a site that leverages Drupal's serious CMS muscles, but Drupal is built from content out. Inline editors act from display in. How do you manage metadata, taxonomy categories, or fields that don't display in your current context but are part of the content you're editing right now (slug, teaser, full node)? How applicable is inline editing to the spectrum of Drupal sites that use WYSIWYG, news journals to commerce sites to tumblr clones? Without going off on a tangent I think there's a discussion that needs to be had on how inline editing can work with Drupal, and it's something that should probably happen before deciding to add inline editing's complexity and development load onto the contributors and codebase of WYSIWYG.

Seujte mentioned in another thread that every new editor doesn't need seven years of vetting and proprietary code before it gets folded into a project with longevity and a widely used api like WYSIWYG, but this is more than a new editor. It's a different way of editing content entirely, and although that's exciting it might not be the best fitting tool for the job. Some proof of concept in an Aloha module -- or even a non-wysiwyg inline editing api -- seems like a good idea before deciding to refactor a workhorse to fit into an evening gown.

TwoD’s picture

Seutje and RobW bring up good points there. Bringing inline editing itself to Drupal is out of Wysiwyg's scope, at least considering the way things currently work.
If a module would do what Seutje mentions in his second paragraph, Wysiwyg should already be able to detect that the new field added to the page supports formats, find which editors are associated with them and load the corresponding profiles and clientside scripts as well as launch the editor. (We probably need to get a patch or two from the queue polished and committed for it to actually work nicely in practice, but that's not much work compared to bringing the mechanics of inline editing into this module.)

If there's need to support additional editors in Wysiwyg to make the experience smoother and nothing is happening in Wysiwyg itself (stability issues, incomplete patches/testing, other bugs, missing features, maintainer absence, whatever), it is possible to use various hooks to extend/override parts of Wysiwyg or implement editors from other modules and continue development in parallel for now. I'm not saying that is the way things have to be done. I just don't want other developers to think we absolutely must be actively working on this in Wysiwyg itself for features like inline editing to move forward. I can only speak for myself but I have a feeling Sun would agree - considering he's got a lot more modules, and Core, to focus on - that we've got more than enough support request, bugs and other issues to keep us busy already, so this particular feature is low on the list. If a well thought through, constructed, documented and reviewed patch be put forth and inline editing lives or dies with it, I'd do my best to get it committed ASAP.

seutje’s picture

Simple proof of concept: https://github.com/seutje/easyedits
ajax handler doesn't get added though, and as RobW mentions: only fields that are displayed can be edited as it is setup as a display formatter
it's probably horribly inefficient and stuff, but it should give you an idea how small it can be and how this approach automatically supports a lotta things like wysiwyg module

TwoD’s picture

Cross-reference: Inline editing will most likely require #356480: Lazy-load editors.

Wim Leers’s picture

#4: it *seems* (but I can definitely be wrong) you're reinventing http://drupal.org/project/editablefields there, but with better behavior: instead of always showing the editable fields, you only show the forms when it has been clicked :)

seutje’s picture

my Google-fu is failing hard lately :x

R.J. Steinert’s picture

Just saw this great video from webchick on Acquia's inline editing prototype that they're hoping to implement in the Spark distribution.


@Wim Leers - I didn't realize that the editablefields module had a "click to edit" feature. That's pretty cool.

Wim Leers’s picture

#8: no, that module doesn't support that, but seutje was building that: see #4 :)

R.J. Steinert’s picture

Behold! :)

@seutje Is this what you are going for with the easyedits module?





Wim Leers’s picture

AFAICT: yes :)

seutje’s picture

hmz, hadn't thought of using a little link for it, neat idea. I was hoping to get away with 0 module CSS though...

R.J. Steinert’s picture

I think using the default Drupal gears that you see on things like checkboxes would make sense if it's possible to add links to those things. Webchick's prototype from the video above uses the "edit" mode that was discussed During D7 development.

philbar’s picture

Status: Active » Closed (duplicate)

This is already being worked on in the following module:

No use in reinventing the wheel.

Also, you might want to check out...