Job Opportunity - JavaScript Developer
Under Development
This version is currently under development and should not be used in a production environment.

Installation

Package Sources

There are a number of ways you can include the Tabulator source in your project.

Package Managers

Tabulator is available to pull from a range of popular package managers:

Yarn

To get Tabulator via the yarn package manager, open a terminal in your project directory and run the following command:

yarn add tabulator-tables 

NPM

To get Tabulator via the NPM package manager, open a terminal in your project directory and run the following command:

npm install tabulator-tables --save

Bower

To get Tabulator via the Bower package manager, open a terminal in your project directory and run the following command:

bower install tabulator --save

Git Clone

If you use the Git CVS you can clone the repository directly to your computer with the following terminal command:

git clone https://github.com/olifolkerd/tabulator.git

Download

You can download the source as a zip file from here.

CDN - UNPKG

To access Tabulator directly from the UNPKG CDN servers, include the following two lines at the start of your project, instead of the locally hosted versions:

<link href="https://unpkg.com/tabulator-tables@5.0.0/dist/css/tabulator.min.css" rel="stylesheet">
<script type="text/javascript" src="https://unpkg.com/tabulator-tables@5.0.0/dist/js/tabulator.min.js"></script>

Latest Version Tracking

If you want your code to track the latest version of Tabulator, then use the following lines of code, when a new version of Tabulator is released it will automatically be available on these links:

<link href="https://unpkg.com/tabulator-tables/dist/css/tabulator.min.css" rel="stylesheet">
<script type="text/javascript" src="https://unpkg.com/tabulator-tables/dist/js/tabulator.min.js"></script>

Include In Your Project

Once you have pulled the source into your project it is time to include the Tabulator library in your code

Importing

If you are using Tabulator in an environment that supports JavaScript Importing importing thenyou should use the import statement:

import {Tabulator} from 'tabulator-tables';

In this case you will also need to import the the appropriate stylesheets into your project, for an SCSS project whis would be:

@import  "~/tabulator-tables/dist/css/tabulator.min.css";

Dist Files

If you are working in a browser environment where you want to load the files directly in browser then you will need to pull in both the tabulator.js and tabulator.css files. These come in both minified and unminified variants

Minified

<link href="dist/css/tabulator.min.css" rel="stylesheet">
<script type="text/javascript" src="dist/js/tabulator.min.js"></script>

Unminified

<link href="dist/css/tabulator.css" rel="stylesheet">
<script type="text/javascript" src="dist/js/tabulator.js"></script>

CDN ESM Import

If your browser environment supports ESM module importing then you can also import the module directly from the CDN

import {Tabulator} from 'https://unpkg.com/tabulator-tables@/dist/js/tabulator_esm.min.js';

Setup Options

Tabulator comes with a range of possible distributions to best suit the needs of your project.

Core With Optional Modules

Tabulator comes with a wide range of optional modules that add functionality to the table. To keep the code imported into your project to a minimum, Tabulator allows you to import the core table functionality and then add these modules as needed.

To start your project you should import the Tabulator class, along with any modules that you may need to add features to your table.

You then register those modules with the Tabulator class, using the registerModule function before you instantiate your first table. This function takes one argument of either a module class or an array of module classes. If needed you can call this function multiple times.

import {Tabulator, FormatModule, EditModule} from 'tabulator-tables';

Tabulator.registerModule([FormatModule, EditModule]);

var table = new Tabulator("#example-table", {
  //table setup options
});

Full Package

If you would prefer to include the whole Tabulator library in your project, complete with all the built in modules, you can instead import TabulatorFull, this will pre-register all modules.

import {TabulatorFull as Tabulator} from 'tabulator-tables';

jQuery Wrapper

If you want to instantiate Tabulator as a jQuery widget (eg. if you are upgrading from v3.x and don't want to switch to using vanilla js) you will need to include the jquery wrapper file after your tabulator js file

<script type="text/javascript" src="dist/js/tabulator.min.js"></script>
<script type="text/javascript" src="dist/js/jquery_wrapper.min.js"></script>

Custom Build

You can also build your own custom distribution of Tabulator using the rollup task automation tool.

Checkout the Build Documentation for full details.