Editable placeholder a la medium.com
JavaScript CSS
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
History.md
Makefile
Readme.md
component.json
editable-placeholder.css
example.html
index.js

Readme.md

editable-placeholder

Editable placeholder.

Installation

$ component install yields/editable-placeholder

Example

<h1></h1>
<div></div>

<script>
  var placeholder = require('editable-placeholder')
    , div = document.querySelector('div')
    , h1 = document.querySelector('h1');

  div.contentEditable = true;
  h1.contentEditable = true;

  placeholder(h1, 'Type a title');
  placeholder(div, 'Type your post');
</script>

License

MIT