====== JSON Table plugin ====== ---- plugin ---- description: Integrate Excel like spreadsheet into json plugin. author : Janez Paternoster email : janez.paternoster@siol.net type : syntax, action lastupdate : 2023-10-26 compatible : Hogfather,Igor,Jack Jackrum depends : json conflicts : edittable similar : json, jsoneditor, jsongendoc, struct, edittable tags : data, json, database, editing, tables downloadurl: https://gitlab.com/dokuwiki-json/jsontable/-/archive/master/json-master.zip bugtracker : https://gitlab.com/dokuwiki-json/jsontable/-/issues sourcerepo : https://gitlab.com/dokuwiki-json/jsontable donationurl: https://paypal.me/jnz022 screenshot_img: https://gitlab.com/dokuwiki-json/jsontable/-/raw/master/demo/screenshot.png ---- ===== Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. Install also [[https://www.dokuwiki.org/plugin:json|JSON plugin]]. ===== Description ===== JSON Table Plugin is based on [[https://www.dokuwiki.org/plugin:json|JSON plugin]]. It adds a table to the page. Table can be edited like spreadsheet and data can be saved inside a page without page reload. Table is based on [[https://handsontable.com/|Handsontable]]. Data for the table is defined by JSON plugin. Table has many options, for example: column header, data validator, select. [ ["2017", "Honda", 10], ["2018", "Toyota", 20], ["2019", "Nissan", 30] ] Here is a [[https://dokuwiki-json-demo.1001beauty.si/|Dokuwiki JSON Demo Server]] with JSON database integrated into DokuWiki. Also source code of this plugin contains demo. You can copy the contents of the demo files into your Dokuwiki and experiment with them. ===== Usage ===== Syntax is similar as in [[https://www.dokuwiki.org/plugin:json|JSON Data Plugin]]:\\ '''' //inline_json// '''' It is parsed with same parser as '''' elements, so rules for //attributes// and //inline_json// are the same. It loads JSON data the same way, from //src// attribute and from //inline_json//. It only has some extra attributes and additional tab for the table. Data source for the table is JSON data defined by the %%%% element (see attributes 'path', 'src', 'src_ext' and //inline_json//). ==== Attribute 'options' ==== It must be a valid [[https://json.org/|JSON]] string inside single quotes. Special characters inside string, like ''%%'%%'', ''%%<%%'' or ''%%>%%'', can be passed by ''''', ''<'' or ''>''. Options are directly passed into [[https://handsontable.com/docs/6.2.2/Options.html|Handsontable options]]. All Handsontable options are freely configurable, except data source. Options may also be defined inside JSON database. In this case they can be referenced from there, for example ''options=%''''$path.to.table_options%''. ==== Attribute 'save' ==== It specifies, how data are stored into ''//inline_data//''. If set to ''all'', then all 'combined_data' will be stored into 'inline_data' on table change. Otherwise only the difference from 'original data' will be saved. This is the default behavior.