1.0.3 • Published 1 year ago

grapesjs-signature-pad v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

GrapesJS Signature Plugin

DEMO

Summary

  • Plugin name: grapesjs-signature-pad

Download

  • CDN
    • https://unpkg.com/grapesjs-signature-pad
  • NPM
    • npm i grapesjs-signature-pad
  • GIT
    • git clone https://github.com/AdamTorma/grapesjs-signature-pad.git

Usage

Directly in the browser

<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet"/>
<script src="https://unpkg.com/grapesjs"></script>
<script src="path/to/grapesjs-signature-pad.min.js"></script>

<div id="gjs"></div>

<script type="text/javascript">
  var editor = grapesjs.init({
      container: '#gjs',
      // ...
      plugins: ['grapesjs-signature-pad'],
      pluginsOpts: {
        'grapesjs-signature-pad': { /* options */ }
      }
  });
</script>

Modern javascript

import grapesjs from 'grapesjs';
import plugin from 'grapesjs-signature-pad';
import 'grapesjs/dist/css/grapes.min.css';

const editor = grapesjs.init({
  container : '#gjs',
  // ...
  plugins: [plugin],
  pluginsOpts: {
    [plugin]: { /* options */ }
  }
  // or
  plugins: [
    editor => plugin(editor, { /* options */ }),
  ],
});

Development

Clone the repository

$ git clone https://github.com/AdamTorma/grapesjs-signature-pad.git
$ cd grapesjs-signature-pad

Install dependencies

$ npm i

Start the dev server

$ npm start

Build the source

$ npm run build

License

MIT