1.0.2 • Published 1 year ago

grapesjs-bootstrap-icon v1.0.2

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

GrapesJS Bootstrap Icon

This plugin adds some of the basic form components and blocks which help in working with forms easier

Demo

Available components: bootstrapIcon

Options

OptionDescriptionDefault
labelBlock nameBootstrap Icon
mediaBlock mediahtml
categoryBlock categoryBasic
modalTitleModal titleBootstrap Icon Picker

Download

  • CDN
    • https://unpkg.com/grapesjs-bootstrap-icon
  • NPM
    • npm i grapesjs-bootstrap-icon
  • GIT
    • git clone https://github.com/ibnuhabibie/grapesjs-bootstrap-icon.git

Usage

Directly in the browser

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

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

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

Modern javascript

import grapesjs from 'grapesjs';
import gjsBootstrapIcon from 'grapesjs-bootstrap-icon';

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

Development

Clone the repository

$ git clone https://github.com/ibnuhabibie/grapesjs-bootstrap-icon.git
$ cd grapesjs-bootstrap-icon

Install it

$ npm i

Start the dev server

$ npm start

License

BSD 3-Clause

1.0.2

1 year ago

1.0.1

1 year ago