watermark-html

1.3.3 • Public • Published

watermark-html

A simple library to draw watermark on HTML element with multiple line.

Installation

$ npm install watermark-html

Usage

Import

ES6 module

import Watermark from 'watermark-html';

CommonJS

let Watermark = require('watermark-html');

Setup

Watermark.set({
	title: 'some text',
	subtitle: 'another text'
}
Param Type Description Extra
title {string} main text
subtitle {string} second text
width {number} stage width optional,default 240
height {number} stage height optional,default 180
angle {number} text rotate angle optional,default -20,value range: [-180, 180]
fontSize {string} text font size optional,default '22px'
alpha {number} text opcity optional,default 0.2,value range: [0.01, 1]

Remove

Watermark.remove();

Dependencies (0)

    Dev Dependencies (8)

    Package Sidebar

    Install

    npm i watermark-html

    Weekly Downloads

    23

    Version

    1.3.3

    License

    ISC

    Unpacked Size

    6.65 kB

    Total Files

    3

    Last publish

    Collaborators

    • lizux