proseosoc
proseosoc

Reputation: 1354

Retrieve data as HTML table ( but same HTML code as the table from which the data is loaded )

I am using Tabulator table library (http://tabulator.info/)

I "loaded data from HTML table"(library feature), then "retrieved data as HTML table"(library feature), but when I compared these 2 HTML tables(loaded & retrieved), I found Tabulator made these changes in retrieved table:

added   inside empty cells &

added class "tabulator-print-table" in <table> &

added class "tabulator-print-table-row" in <tr> &

added attribute colspan='1' rowspan='1' in <th> tag

http://tabulator.info/docs/4.8/data , http://tabulator.info/docs/4.8/update#retrieve-html

which of these things can be removed while retrieving data as HTML Table?

Upvotes: 0

Views: 77

Answers (1)

Oli Folkerd
Oli Folkerd

Reputation: 8348

These features are added by Tabulator to ensure that data retrieved from Tabulator in HTML format is correctly laid out. remember that most people don't import their data into tabulator from an HTML table, it is more of a legacy feature.

If you want a more plain table then it would be a simple matter of writing a function to iterate over the html returned from Tabulator to remove the classes and attributes that you find undesirable

Upvotes: 1

Related Questions