Vote UpVote

Faking a placeholder Attribute for an Editable div, and Some CSS Tricks

Craig Stuntz's Weblog – HTML input elements have a placeholder attribute which you can use to show a bit of text to prompt the end user. Although you can make an editable div by using the contenteditable attribute, it will not support the placeholder attribute. I needed to do both, so I ended up reinventing the placeholder attribute for editable divs. Here’s how I did it. I wanted the "placeholder" in the editable div to behave as much as possible like a "real" placeholder in an input element. So I started by making a list of requirements: The placeholder text should cosmetically resemble an input’s ...
Favorite? Off-Topic? Craig Stuntz @ 2013-01-29 18:01


Visits: 455
Votes: 3
Favorites: 0
Off-Topic: 2

Visits by Source

User Actions

Users who voted for this posting

Craig Stuntz
Neville Cook
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)