Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Adding HTML Table in a description causes an issue with the designer. #328

Open
reinanchan opened this issue Jul 2, 2015 · 9 comments
Open

Comments

@reinanchan
Copy link

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.

/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

I inspected the element and found this:
http://imgur.com/wLYtxTM

it's inserting a bunch of br tags when it previews the description.

Has anyone else had this problem?

EDIT: Depending on how big the table is vertically, the blank space appears to be the same size.

@sichvoge
Copy link
Contributor

Hi @reinanchan,

can you try something for me, please. Could you download the standalone console and post your RAML in it to see if that is a problem of the console or the designer pushing that into the console.

https://github.com/mulesoft/api-console

@reinanchan
Copy link
Author

Hey @sichvoge,

Yeah this issue also occurs in the console and the mulesoft liveportal.

@sichvoge
Copy link
Contributor

It should be fixed with PR #345. Could you get the newest version of the designer please and try again.

@reinanchan
Copy link
Author

htmlramlissue

I pulled the newest version, but with an html table it still has the empty space.

@sichvoge
Copy link
Contributor

@jcenturion could you please have a look on that?!

@sichvoge
Copy link
Contributor

@reinanchan could you try to use markdown table notation please?! Have a look on the PR for an example

@ty10r
Copy link

ty10r commented Nov 18, 2015

This seems to be caused in api-console, not designer.
https://github.com/mulesoft/api-console/blob/master/src/app/app.js#L44
This option causes
tags after each line break in the html, which get grouped together after the html.

Changing this option may break many portals in existence.

I suggest we either do on the fly conversion of html tables to github flavored tables, or we force users to use github flavored tables

@jcenturion

@ty10r
Copy link

ty10r commented Nov 18, 2015

@reinanchan

could you instead try to use github flavored tables?

| First | Last | Age |
| -------|-------|------ |
| Jill | Smith | 50  |
| Eve | Jackson | 94 |

Would become:

First Last Age
Jill Smith 50
Eve Jackson 94

@sichvoge
Copy link
Contributor

It's still an CSS issue or something rendering HTML inside the console.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants