ep_thumbnails

    1.0.1 • Public • Published

    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 })

    Install

    npm i ep_thumbnails

    DownloadsWeekly Downloads

    10

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • jeremyplease