Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tylerecouture/summernote-table-headers

A Summernote plugin that adds a button to the table popover allowing the user to toggle the first row as a table header.
https://github.com/tylerecouture/summernote-table-headers

Last synced: about 1 month ago
JSON representation

A Summernote plugin that adds a button to the table popover allowing the user to toggle the first row as a table header.

Awesome Lists containing this project

README

        

# summernote-table-headers
A [Summernote](http://summernote.org/) plugin that adds a button to the table popover allowing the user to toggle the first row as a table header.

### How it works
The plugin creates a `` element at the top of the table, and moves the top `` into the header. It then swaps each of the `` cells for `` header cells. Toggle the header off reversese this.

When the summernote table popover is used to create a new column, summernote creates `` cells within the header. The pluging detects these changes to the table and converts them to propper `` header cells.

### Usage

1. Include `summernote-table-headers.js`
2. Customize the Summernote table popover to include `tableHeaders`
````
$(document).ready(function() {
$('#summernote').summernote({
popover: {
table: [
['add', ['addRowDown', 'addRowUp', 'addColLeft', 'addColRight']],
['delete', ['deleteRow', 'deleteCol', 'deleteTable']],
['custom', ['tableHeaders']]
],
},
});
});
````

### Working Example

https://rawgit.com/tylerecouture/summernote-table-headers/master/Example/example.html

### To do
* Add vertical headers