08/09/2011

contentEditable Property

by Cyle
Categories: Web Development
Tags: , , ,
Comments: Leave a Comment

When the contentEditable property is used, it makes your text editable in the user’s browser (IE, Firefox, and Safari). The contentEditable property has been around a while, but not a standard until recently under HTML5. It can be very fun and amusing to play with.

Example:
<div contenteditable="true">This text can be edited.
And this text can be edited.
Go ahead and play with it!</div>
Result:

This text can be edited.
And this text can be edited.
Go ahead and play with it!

 
This little trick is a lot more entertaining than it is useful, but it could be used when you want a user to edit a page or something and then send it back to you/the server via JavaScript.


Leave a Reply

Your email address will not be published. Required fields are marked *



user-avatar
Today is Sunday
03/26/2017