angular-markdown-directive icon indicating copy to clipboard operation
angular-markdown-directive copied to clipboard

Showdown Tables Extension

Open 3goats opened this issue 10 years ago • 7 comments

One other question. Is it possible to use the tables extensions ?

Thanks

3goats avatar Mar 27 '15 19:03 3goats

Sorry just saw the docs.

3goats avatar Mar 27 '15 20:03 3goats

OK just tried the table extension it doesn't render the table however the Github extension work fine.

3goats avatar Mar 27 '15 20:03 3goats

Can you please provide a reproduction via jsbin, plnkr.co, or jsfiddle?

This saves me a lot of time. Thanks!

btford avatar Mar 27 '15 21:03 btford

Sure will do it later.

Sent from my iPhone

On 27 Mar 2015, at 21:15, Brian Ford [email protected] wrote:

Can you please provide a reproduction via jsbin, plnkr.co, or jsfiddle?

This saves me a lot of time. Thanks!

— Reply to this email directly or view it on GitHub.

3goats avatar Mar 27 '15 21:03 3goats

You need to add your extension dependency :

<script src='/bower_components/showdown/src/extensions/table.js'></script>

And configure your angular app file :

.config(['markdownConverterProvider', function (markdownConverterProvider) {
   markdownConverterProvider.config({
      extensions: ['table']
   });
}])

Your md table will be parse in html table

| Col A     | Col B     |
|---------  |---------  |
| Cell A1   | Cell B1   |
| Cell A2   | Cell B2   |
<table>
   <thead>
      <tr>
         <th id="col_a" style="text-align: left;"> Col A       </th>
         <th id="col_b" style="text-align: left;"> Col B     </th>
      </tr>
   </thead>
   <tbody>
      <tr>
         <td style="text-align: left;"><p>Cell A1     </p></td>
         <td style="text-align: left;"><p>Cell B1   </p></td>
      </tr>
      <tr>
         <td style="text-align: left;"><p>Cell A2     </p></td>
         <td style="text-align: left;"><p>Cell B2   </p></td>
      </tr>
   </tbody>
</table>

fresnault avatar Jul 29 '15 09:07 fresnault

I'm having an issue getting the tables extension to work. I've followed the noted instructions for including the tables.min.js script, as well as registering the extension, and I'm not seeing any change in behavior.

For reference, you can see the repro at: https://26-dot-perfkit-explorer.appspot.com/explore?dashboard=5750085036015616

And the commit that, based on my understanding of this thread, should have enabled the tables: https://github.com/GoogleCloudPlatform/PerfKitExplorer/commit/fc23715dc1ec5226821820e0fda49cfcbee5f911

jmuharsky avatar Dec 10 '15 17:12 jmuharsky

For some reason it doesn't recognize the ":" alignment indicators, for me

this works:

| Col A     | Col B     |
|---------  |---------  |
| Cell A1   | Cell B1   |
| Cell A2   | Cell B2   |

And this doesn't:

| Col A     | Col B     |
|:---------  |:---------  |
| Cell A1   | Cell B1   |
| Cell A2   | Cell B2   |

cortezcristian avatar Mar 26 '17 22:03 cortezcristian