Blueprint by Tiny
Return to Tiny.cloud
Return to Tiny.cloudTry TinyMCE for Free
Search by
Abstract depiction of table sorting.

Sorting HTML tables

Ben Long

December 17th, 2019

Written by

Ben Long
Ben Long

Category

How-tos & Tutorials

Tagged

If you are working with HTML tables, and you want to provide readers with a way of sorting rendered HTML table data, you could implement your own table sort functionality. There are a few examples on the Internet, such as these Javascript examples from W3Schools.

On the other hand, if you’re using our WYSIWYG HTML editor in your applications, and you want to enable your content creators to sort table data while working with it in the editor, now they can with our Advanced Tables plugin.

 

TinyMCE WYSIWYG HTML editor with sample table data, sorted by first column in ascending order.

 

This saves your users time, especially when working with large datasets, because they no longer have to find workarounds to manipulate it (like pasting it to and from Microsoft Excel).

 

Sorting columns and rows with Advanced Tables in TinyMCE

The Advanced Table premium plugin extends the core TinyMCE table plugin by adding table sort options for numerical and text data.

It even goes one step further than most table sort functionality by allowing users to sort on rows as well as columns.

 

Sort menu displayed for selected column.

 

Advanced Sort dialog.

 

Enabling Advanced Tables

To enable the Advanced Tables plugin, add advtable to the list of plugins when initializing TinyMCE. For example:

tinymce.init({
  plugins: "table advtable",
  menubar: "table"
});

NOTE: Advanced Tables can be purchased on its own, but it’s also included in our Tiny Pro Bundle, together with a whole range of productivity tools. (You can get a free trial of all our premium plugins with our free API Key for TinyMCE!)

For more information about Advanced Tables, check out the related documentation.

 

What next?

Look out for more functionality coming to Advanced Tables in future releases.

Don’t yet have a cloud subscription? Get a free API Key (including a trial of our premium plugins).

Contact us now for more information about our WYSIWYG HTML editor and how it’s helping other developers and users of their apps.

TinyMCE
Ben Long
byBen Long

Developer Advocate at Tiny. Computer scientist turned storyteller. Reminisces about programming on the MicroBee. Writes picture books for kids. Also the wearer of rad shoes. “Science isn’t finished until you share the story.”

Related Articles

  • Text "Insert Template" with corresponding icon above.
    How-tos & Tutorials

    Making the most of templates in TinyMCE

    by Marty Friedel in How-tos & Tutorials
Subscribe for the latest insights served straight to your inbox. Delivered weekly.

Deploy TinyMCE in just 6 lines of code

Built to scale. Developed in open source. Designed to innovate.

Begin with your FREE API Key
Tiny Editor