Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown Table Formatting #2565

Closed
mdaviesnz opened this issue Nov 7, 2018 · 2 comments
Closed

Markdown Table Formatting #2565

mdaviesnz opened this issue Nov 7, 2018 · 2 comments
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@mdaviesnz
Copy link

Environment

  • Python version: 3.5.2
  • NetBox version: 2.4.7

Proposed Functionality

Improve/add formatting of markdown tables in comments fields.

Currently tables from markdown in comment fields appear without formatting and nice spacing making it difficult to read. Applying the already loaded bootstrap CSS style on the table improves this.

Using chrome dev tools I added class="table" to the second table tag for this example:
netbox-table-style

Not sure if it taking the full width of the panel is desirable but this approaches the extent of my CSS knowledge already. There might be a more suitable style in bootstrap and perhaps there's a better way to do this with CSS otherwise?

Use Case

I use tables to document information given by circuit providers which doesn't otherwise go into existing fields on the circuit objects.

Database Changes

N/A

External Dependencies

N/A

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application help wanted status: accepted This issue has been accepted for implementation labels Nov 8, 2018
@jeremystretch
Copy link
Member

It seems that Markdown doesn't support table classes, so simply adding class="table" to rendered Markdown won't work. However, we can add a bit of custom CSS to clean things up.

@mdaviesnz
Copy link
Author

Thanks Jeremy, looks great!

@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants