editable-placeholder-component

ContentEditable placeholder for use with nickjackson/editable

Editable-Placeholder

ContentEditable placeholder for use with nickjackson/editable

This component is a plugin to use with nickjackson/editable.

$ component install nickjackson/editable
var Editable = require('editable')
  , Placeholder = require('editable-placeholder')
  , el = document.querySelector('h1')
  , display = true
  , ph = Placeholder('placeholder text here', display);
 
Editable(el).use(ph);
  • text - string you wish to be displayed in the placeholder
  • display - display text on initalize (boolean)

Returns a wrapper function with the main argument requring an instance of Editable.

  • Test on other browsers. Currently only tested on Chrome OSX.

MIT