Skip to content

Etherpad plugin that generates thumbnail previews of pads on creation and update.

Notifications You must be signed in to change notification settings

roamandwander/ep_thumbnails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thumbnails Etherpad Plugin

This Etherpad Lite plugin generates thumbnail previews of pads on creation and update.

How are thumbnails created?

  1. HTML of pad is loaded from Etherpad.
  2. Image of rendered HTML is taken using node-webshot
  3. Image is saved as {PADNAME}.png to settings.savePath (default: ./src/static/images/thumbnails/)

When are thumbnails created?

Images are generated immediately on pad creation. Then, whenever a pad is updated it gets added to a simple queue that generates an updated image within settings.interval (default: 30 seconds).

Settings

Settings for plugin can be set in Etherpad settings.json with key ep_thumbnails.

Example:

"ep_thumbnails": {
	"css": "body { padding: 50px 55px!important; font-size: 16px; line-height: 25px; }",
	"savePath": "./app/images/thumbnails/",
	"windowSize": { "width": 800, "height": 800 },
	"shotSize": { "width": 800, "height": 800 }
}

Available options:

  • cssFiles: array of css file paths to use with HTML
  • css: css string to use with HTML
  • interval: interval in ms to generate images of updated pads (default: 30000)
  • savePath: path to save images to (default: ./src/static/images/thumbnails/)
  • windowSize: the dimension of browser window to use for webshot (docs) (default: { width: 800, height: 800 })
  • shotSize: the dimension of image generated by webshot (docs) (default: { width: 800, height: 800 })

About

Etherpad plugin that generates thumbnail previews of pads on creation and update.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages