Hipsum.js
A filler text helper for Handlebars templates.
Installation
Install Hipsum.js in your project folder using a terminal.
npm install hipsum --save
In your application you can then include and register the helper.
var handlebars = handlebars;
Usage
In your Handlebars templates you can now use the helper called filler
.
{{filler}} // produces one paragraph of Lorem ipsum.{{filler 47}} // produces 47 words of Lorem ipsum.
Alternate Texts
If you prefer some good ol' English why not use some Shakespeare as your filler text?
{{filler 10 "hamlet"}} // produces 10 words of "To be or not to be".
Advanced Setup
Alternatively you can pass the helper around and not let Hipsum.js register it. This is useful e.g. if you use express3-handlebars or when you want to specify the name of the helper yourself.
var handlebars = hipsumHelper = ; handlebars;
Roadmap
- Random text generation
- Richtext
- Paragraphs
- Links
- Headings, Lists, Tables, Blockquotes
- Images(?)
- Code(?)