1.1.2 • Published 8 months ago

grapesjs-blocks-table v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

GrapesJS Blocks Table

Plugin for GrapesJS that adds table block.

Options

OptionDescriptionDefault
containerIdContainer to wich will be binded jQuery Event handlers to control adding new table and handler for adding and removing rows and columns.document
tblResizableShould the table have resize handlestrue
cellsResizableShould cells within the table have resize handlestrue
componentCellId of component that should be used for cellscustomCell
componentCellHeaderId of component that should be used for header cellscustomHeaderCell
componentRowId of component that should be used for header rowscustomRow

Usage

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

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

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

After dragging the table block to editor modal with initial table settings will open. Further manipulation (adding, removing, merging) of rows and columns is done through custom toolbar. You can also double click cell to automatically add text component.

License

BSD 3-Clause

1.1.2

8 months ago

0.0.118

2 years ago

0.0.112

2 years ago

0.0.46

2 years ago

0.0.31

2 years ago