# Did anyone try to embed Datatables into Topic Body?

**URL:** <https://meta.discourse.org/t/did-anyone-try-to-embed-datatables-into-topic-body/129299>\
**Category:** Feature\
**Created:** [September 23, 2019, 12:59pm UTC](https://meta.discourse.org/t/did-anyone-try-to-embed-datatables-into-topic-body/129299 "2019-09-23T12:59:47Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
**Post date:** [September 23, 2019, 3:54pm UTC](https://meta.discourse.org/t/did-anyone-try-to-embed-datatables-into-topic-body/129299/9 "2019-09-23T15:54:24Z")

</div>

Datatables is a jQuery plugin. jQuery plugins can be implemented quite easily in Discourse. There are a couple of examples of this like the [Tiles](https://github.com/discourse/Discourse-Tiles-image-gallery/blob/master/common/header.html) and [Slick](https://github.com/discourse/Discourse-Slick-image-gallery/blob/master/common/header.html) gallery theme components.

Essentially, what you need to do is to create a decorator for posts that contain tables that you want to target with dataTables.

I’ve created an example of how you can do that here

> **[GitHub - hnb-ku/dataTables\_Demo](https://github.com/hnb-ku/dataTables_Demo)**
>
> Contribute to hnb-ku/dataTables\_Demo development by creating an account on GitHub.

and created a preview for it on theme creator here

[https://theme-creator.discourse.org/theme/Johani/discourse\_datetables](https://theme-creator.discourse.org/theme/Johani/discourse_datetables)

It’s obviously a bit basic for now, and it’s missing some styles but it should be a good starting point as sorting, searching and pagination work just fine.

---

_[View the full topic](https://meta.discourse.org/t/did-anyone-try-to-embed-datatables-into-topic-body/129299)._
