marijnh/CodeMirror — pull request #1021 by MasonM (2012-11-30 05:56:30+00:00)
Title: Proposal: HTML5 placeholder emulation

I think CodeMirror should emulate [HTML5 placeholders](http://dev.w3.org/html5/spec/single-page.html#attr-input-placeholder) when an instance is constructed via fromTextArea() and the textarea has the "placeholder" attribute, since there's many places where placeholders are useful (e.g. the GitHub box I'm typing in). This commit adds basic support for placeholders via a CSS class that's toggled on focus and blur. Let me know if the basic concept is sound, and if so I'll clean the code up, add docs, and write some tests.