We have moved to a new Sailfish OS Forum. Please start new discussions there.
4

TJC markdown table support [answered]

asked 2015-06-14 20:01:50 +0300

qrosh gravatar image

updated 2015-06-15 14:13:52 +0300

Hey I would like to know how to add tables to here.

The usual markdown syntax is

| Tables   |      Are      |  Cool |
|----------|:-------------:|------:|
| col 1 is |  left-aligned | $1600 |
| col 2 is |    centered   |   $12 |
| col 3 is | right-aligned |    $1 |

See here for more information.

edit retag flag offensive close delete

Comments

1

Currently the table extension is not enabled in the markdown library used, but I'll see if enabling that works ok.

One problem might be that Askbot uses a python library for rendering the markdown in post and a javascript library for rendering the post preview. And I think that the javascript library does not support tables.

Keto ( 2015-06-14 21:35:43 +0300 )edit

1 Answer

Sort by » oldest newest most voted
4

answered 2015-06-14 23:06:44 +0300

simo gravatar image

updated 2015-06-14 23:22:20 +0300

Tables

Unfortunately Askbot has only basic Markdown elements of GCP with years old version. The method you used above in your question exists, but it's not updated to the Askbot, so there's currently no support for tables.

Workaround: You need to adjust the column widths manually, or use some simple tablegenerator and copypaste here. One example of such table, additionally using pre (no inline needed this way)

+-----------+------------+
| City name | Population |
+-----------+------------+
| Adelaide  |  1158259   |
| Brisbane  |  1857594   |
| Darwin    |   120900   |
| Hobart    |   205556   |
| Sydney    |  4336374   |
| Melbourne |  3806092   |
| Perth     |  1554769   |
+-----------+------------+

edit: testing basic html -tags (seems to work, but with very simple layout)

Top1 Top2
row1 column1 row1 column2
row2 column1 row2 column2

click edit below to see how this answer was formatted

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2015-06-14 20:01:50 +0300

Seen: 324 times

Last updated: Jun 15 '15