# How to add a class attribute to a table created using markdown

**URL:** <https://meta.discourse.org/t/how-to-add-a-class-attribute-to-a-table-created-using-markdown/84338>\
**Category:** Product Support\
**Created:** [April 1, 2018, 6:04pm UTC](https://meta.discourse.org/t/how-to-add-a-class-attribute-to-a-table-created-using-markdown/84338 "2018-04-01T18:04:14Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![sarahann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sarahann/32/96703_2.png) [@sarahann](https://meta.discourse.org/u/sarahann)\
**Post date:** [June 7, 2018, 12:35am UTC](https://meta.discourse.org/t/how-to-add-a-class-attribute-to-a-table-created-using-markdown/84338/14 "2018-06-07T00:35:40Z")

</div>

Actually, I remember now why I was trying to do this in a plugin and not in javascript. |

In JS its hard to tell when the user is in the admin page. And in the past I have tried to add classes before and I couldn’t find a persistent event so that my JS code would run on every page. api.onpagechange only works when the url changes (not the view).

Thank you for the help!

I guess I’ll overwrite the admin wrapper with my class name in it and see how that goes

---

_[View the full topic](https://meta.discourse.org/t/how-to-add-a-class-attribute-to-a-table-created-using-markdown/84338)._
