ep_thumbnails
v1.0.1
Published
An Etherpad Lite plugin that generates thumbnail previews of pads on creation and update.
Downloads
24
Maintainers
Readme
Thumbnails Etherpad Plugin
This Etherpad Lite plugin generates thumbnail previews of pads on creation and update.
How are thumbnails created?
- HTML of pad is loaded from Etherpad.
- Image of rendered HTML is taken using node-webshot
- Image is saved as
{PADNAME}.png
tosettings.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 HTMLcss
: css string to use with HTMLinterval
: 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 }
)