O'Reilly logo

Drupal 7 Development by Example Beginner's Guide by Kurt Madel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Developing a custom contenteditable module

In this section, we are going to develop a module that provides a field formatter for text fields that allows in-place editing of text fields through the HTML5 contenteditable attribute.

Note

See http://blog.whatwg.org/the-road-to-html-5-contenteditable for a good summary of the contenteditable attribute.

The contenteditable attribute value of true indicates that the HTML element it is applied to is editable. However, to make this truly useful, we will need to explore a way of saving the edited content asynchronously. In doing so, we will explore some new JavaScript and AJAX development concepts in Drupal 7.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required