New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

grapesjs-table

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grapesjs-table

grapesjs-table

latest
Source
npmnpm
Version
1.0.8
Version published
Weekly downloads
572
24.89%
Maintainers
1
Weekly downloads
 
Created
Source

grapesjs-table

NPM version NPM downloads Travis build Chat Discord GitHub issues dependencies status devDependencies status

DEMO

Requirements

- GrapesJS v0.13.8 or higher

HTML

<link
  href="https://unpkg.com/grapesjs/dist/css/grapes.min.css"
  rel="stylesheet"
/>
<script src="https://unpkg.com/grapesjs"></script>
<script src="https://unpkg.com/grapesjs-table"></script>

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

JS

const editor = grapesjs.init({
  container: "#gjs",
  height: "100%",
  fromElement: true,
  storageManager: false,
  plugins: ["grapesjs-table"],
});

CSS

body,
html {
  margin: 0;
  height: 100%;
}

Summary

  • Plugin name: grapesjs-table
  • Components
    • table - Main table component
    • tablebody - Component which contains table body
    • tableFooter - Component which contains table footer
    • tableHead - Component which contains table header
  • Blocks
    • table

Options

OptionDescriptionDefault
tableBlockObject to extend the default table block, eg. { label: 'table', attributes: { ... } }
tablePropsObject to extend the default table properties, eg. { name: 'My table', droppable: false, ... }{}
bodyPropsObject to extend the default table body properties{}
headPropsObject to extend the default table head properties{}
footerPropsObject to extend the default table footer properties{}
attrTableTable attribute identifier (main component)data-table
attrTableBodyTable body attribute identifierdata-tbody
attrTableFooterTable footer attribute identifierdata-tfoot
attrTableHeaderTable Head attribute identifierdata-thead
classTableDefault class to use on tabletable
classTableBodyDefault class to use on table bodytable-body
classTableFooterDefault class to use on table body footertable-footer
classTableHeaderDefault class to use on table body headertable-header
styleDefault style for table table { .... (check the source)

Download

  • CDN
    • https://unpkg.com/grapesjs-table
  • NPM
    • npm i grapesjs-table
  • GIT
    • git clone https://github.com/anubhavjain786/grapesjs-table.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-table.min.js"></script>

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

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

Modern javascript

import grapesjs from 'grapesjs';
import plugin from 'grapesjs-table';
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/anubhavjain786/grapesjs-table.git
$ cd grapesjs-table

Install dependencies

$ npm i

Start the dev server

$ npm start

Build the source

$ npm run build

License

MIT

Keywords

grapesjs

FAQs

Package last updated on 17 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts