evilstreak / markdown-js

A Markdown parser for javascript
7.69k stars 863 forks source link

How can I insert a table? And a video? #291

Open erossini opened 7 years ago

erossini commented 7 years ago

Hi guys, just a question about this two tags. I tried to use something link that

| Tables   |      Are      |  Cool |
|----------|:-------------:|------:|
| col 1 is |  left-aligned | $1600 |
| col 2 is |    centered   |   $12 |
| col 3 is | right-aligned |    $1 |

but it shows this table as the same (no html table).

Can I insert link to a video and show it in the page? Thank you in advance.

aforwardz commented 6 years ago

I have the same issue. I have tried many different formats of table and the tests in #230 but it seems that the table has not been convert to html table through the function 'markdown.toHTML()'
So I wonder whether this md-js supports table or what is the correct markdown format?

stutiredboy commented 6 years ago

Second.

iskrid commented 6 years ago

Hi, I'm not sure if you tried the example, but you can use your example and must simply use the "Maruku" markdown dialect ... worked for me at all:

html_content = markdown.toHTML( md_content, 'Maruku');
bluesnail95 commented 6 years ago

@iskrid you are right,I have solved my problem according you say.