# Sortable Tables on the TBP Forum?

**URL:** <https://forum.thousandbrains.org/t/sortable-tables-on-the-tbp-forum/1031>\
**Category:** Feedback\
**Tags:** discourse, tables, sorting\
**Created:** [March 18, 2026, 9:32pm UTC](https://forum.thousandbrains.org/t/sortable-tables-on-the-tbp-forum/1031 "2026-03-18T21:32:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rich\_Morin](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.thousandbrains.org/rich_morin/32/89_2.png) [@Rich\_Morin](https://forum.thousandbrains.org/u/Rich_Morin)\
**Post date:** [March 18, 2026, 9:32pm UTC](https://forum.thousandbrains.org/t/sortable-tables-on-the-tbp-forum/1031/1 "2026-03-18T21:32:06Z")

</div>

I’d like to request that the admins look into adding sortable tables to the forum. TBH, I’m not sure how much use this feature would get, but it would be fun to play with and could be a boon to folks publishing tabular information. Anyway, ChatGPT sez:

> 🧭 Option 1 — Use a lightweight JS library (works on GitHub Pages, most static sites)
> 
> This is the most common and portable approach.
> 
> ✅ Minimal setup with Tablesort
> 
> Add this to your page (or site template):
> 
> Then just write your Markdown table normally:
> 
> | Name | Age | Score |
> | --- | --- | --- |
> | Alice | 30 | 88 |
> | Bob | 25 | 95 |
> | Carol | 27 | 91 |
> 
> 👉 When rendered, click column headers to sort.
> 
> Why this is nice
> 
> No changes to your Markdown
> 
> Works on GitHub Pages (Jekyll, etc.)
> 
> Very small and fast
> 
> …
> 
> # 🧭 Option 4 — Discourse (special case)
> 
> Discourse **does NOT support sortable tables by default**.
> 
> Options:
> 
> ### 1. Admin plugin (best if you control the forum)
> 
> - `discourse-data-explorer` (not exactly for tables)
> - custom theme component with Tablesort
> 
> ### 2. Theme component approach
> 
> If you can add theme JS:
> 
> api.decorateCookedElement((elem) =\> {  
> elem.querySelectorAll(“table”).forEach(t =\> new Tablesort(t));  
> });
> 
> 👉 This gives sorting across all posts automatically.

---

<div class="post-metadata">

**Author:** ![Rich\_Morin](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.thousandbrains.org/rich_morin/32/89_2.png) [@Rich\_Morin](https://forum.thousandbrains.org/u/Rich_Morin)\
**Post date:** [March 21, 2026, 1:00am UTC](https://forum.thousandbrains.org/t/sortable-tables-on-the-tbp-forum/1031/2 "2026-03-21T01:00:31Z")

</div>

Careful Reader may have noticed that the JS code in my previous post isn’t working. [ChatGPT sez](https://chatgpt.com/share/69bded90-1a7c-8005-a725-c795d250821b):

> It looks like Discourse strips or blocks JavaScript in normal posts, so this approach won’t work unless the forum admins add sortable-table support at the theme/plugin level.
