# 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:** 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:** 12

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [June 6, 2018, 11:47pm UTC](https://meta.discourse.org/t/how-to-add-a-class-attribute-to-a-table-created-using-markdown/84338/12 "2018-06-06T23:47:40Z")

</div>

This has the code for reading the logged in user

> [@Reply reminder - Remind users to reply to new users topics with zero replies](https://meta.discourse.org/t/reply-reminder-remind-users-to-reply-to-new-users-topics-with-zero-replies/42644/8):
>
> Yes, you can \<script\> Discourse.ExternalNavItem = Discourse.NavItem.extend({ href : function() { return this.get('href'); }.property('href') }); I18n.translations.en.js.filters.unanswered = { title: "Unanswered", help: "Topics that have not be answered" }; Discourse.NavItem.reopenClass({ buildList : function(category, args) { var currentUser = Discourse.User.current(); var list = this.\_super(category, args); if(!category && currentUser != null && cu…

Relevant JS (admin property is a guess it might be isAdmin or something along those lines)

```plaintext
var currentUser = Discourse.User.current();
if(currentUser != null && currentUser.staff && !currentUser.admin) {
       

```

You just have to figure out what event to put that code in (I think there is a page load event but I don’t recall it’s name)

---

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