Adding HTML Table in description. API Designer Issue


#1

I’m having an issue where I want to insert a table into a description, and when I view it on the API Designer it leaves a big blank white space area before the table. Has anyone else had this problem?

/products
    displayName: Products
    get:
        description: |
            <table style = "width 100%">
              <tr>
                 <td>Jill</td>
                 <td>Smith</td>
                 <td>50</td>
              </tr>
              <tr>
                 <td>Eve</td>
                 <td>Jackson</td> 
                 <td>94</td>
              </tr>
           </table>``

Picture: (Area marked in red is the blank white space)
http://imgur.com/DrEU4VV

EDIT: I posted the issue on github: https://github.com/mulesoft/api-designer/issues/328

I also inspected the element where the description is previewed and found this:
http://imgur.com/wLYtxTM

It’s inserting <br> tags for some reason.


#2

Can you please raise an issue on github - https://github.com/mulesoft/api-designer. That way you make sure that the contributors see it as well :wink:


#3

I posted the issue on the github repo. Thanks!


#4

You can use a !include instead of putting the description inline. The file you include can be markdown. You can have tables in your markdown file.

As of now, there are problems with the way markdown tables are displayed in Console, but you could give this a try and see how your tables look.


#5

I still get the same issue with the !include. The blank space appears and it seems that depending on how big the table is vertically, the blank space is the same size. Just a quick observation. It’s pretty strange.


#6

It’s definitely how the api-console renders the markdown. We will have a look at this!