0.1.2 • Published 6 years ago

grapesjs-plugin-expose v0.1.2

Weekly downloads
1
License
BSD-3-Clause
Repository
github
Last release
6 years ago

GrapesJS Expose

This plugin adds the possibility to expose data on a global variable.

Sumary

  • Plugin name: grapesjs-plugin-expose

Options

  • target Property of window that will receive the data. Default: xGrapes

Download

  • npm i grapesjs-plugin-expose

Usage

<link rel="stylesheet" href="path/to/grapes.min.css">
<script src="path/to/grapes.min.js"></script>
<script src="path/to/grapesjs-plugin-expose.min.js"></script>

<div id="gjs"></div>
<script type="text/javascript">
  var editor = grapesjs.init({
      container : '#gjs',
      plugins: ['grapesjs-plugin-expose'],
      pluginsOpts: {
        'grapesjs-plugin-expose': {
          target: 'YOUR_CUSTOM_PROPERTY' // Default: "xGrapes"
        }
      }
  });
</script>

License

MIT