====== PrettyTables Plugin ======
---- plugin ----
description: Toolbar button that fixes the source code of a table by aligning the columns
author : Constantinos (ConX) Xanthopoulos
email : conx@xanthopoulos.info
type : action
lastupdate : 2016-06-21
compatible : Ponder Stibbons, Detritus, Hogfather
depends :
conflicts :
similar :
tags : tables, toolbar, button
downloadurl: https://github.com/ConX/dokuwiki-plugin-prettytables/zipball/master
bugtracker : https://github.com/ConX/dokuwiki-plugin-prettytables/issues
sourcerepo : https://github.com/ConX/dokuwiki-plugin-prettytables/
donationurl:
----
===== Installation =====
Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
===== Usage =====
- Select the table you want to fix.
- Click on the button
To manage alignments:
* Put min. 2 spaces in front AND after the cell value, it gets **centered**
* Put less than 2 spaces in front, it gets **left aligned**
* Put less than 2 spaces after the value, it gets **right aligned**
===== Bug Reporting =====
Please use GitHub Issues.
===== Example =====
**Original Table**
^ Year ^ Location|
| 2004| Athens, Greece|
| 2008| Beijing, China|
| 2012| London, United Kingdom |
| 2016| Rio de Janeiro, Brazil|
**Fixed Table**
^ Year ^ Location |
| 2004 | Athens, Greece |
| 2008 | Beijing, China |
| 2012 | London, United Kingdom |
| 2016 | Rio de Janeiro, Brazil |
===== FAQ =====
* **Does it keep the header cells (the ones that start with "^") intact?**\\ Yes, the plugin will maintain that properly.
* **Does it support left, center, right alignments?**\\ Yes, thanks to //janosh// who added that feature!