0.1.0 • Published 7 years ago

bootstrap.table-editor v0.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

Bootstrap Table Editor

What?

Editable table with jQuery and Bootstrap

Requirements

Bootstrap 4 jQuery 1.7.1+

Usage

This is the minimum code to make an editable table

$('table').tableEditor()

If you want to set options add an object which contains your options as parameters

$('table').tableEditor({
	// Localization
	// Supported: English (en, default) and Spanish (es)
	lang: 'en',
	// onChange event
	onChange: function(value, cell, table, tableEditor) {
		// ..
	}
})

Convert table to JSON

$('table').tableEditor('json')

Convert JSON to table

$('table').tableEditor('json', '[["1","2","3","4","5"],["6","7","8","9","0"]]')

When you wish, you can restore the previous state of the table

$('table').tableEditor('destroy')