Skip to content

Latest commit

 

History

History
85 lines (67 loc) · 2.48 KB

README.md

File metadata and controls

85 lines (67 loc) · 2.48 KB

Parsedown Tablespan

An extension of ParsedownExtra and Parsedown that adds support for rowspan and colspan.

Also, ParsedownExtended 1.1+ provides in the same way.

Installation

Composer

Install the composer package by running the following command:

composer require kennysoft/parsedown-tablespan

Manual

  1. Download the "Source code" from the latest release
  2. Include Parsedown.php, ParsedownExtra.php, and ParsedownTablespan.php

Example

$ParsedownTablespan = new ParsedownTablespan();

echo $ParsedownTablespan->text('
| >     | >           |   Colspan    | >           | for thead |
| ----- | :---------: | -----------: | ----------- | --------- |
| Lorem | ipsum       |    dolor     | sit         | amet      |
| ^     | -           |      >       | right align | .         |
| ,     | >           | center align | >           | 2x2 cell  |
| >     | another 2x2 |      +       | >           | ^         |
| >     | ^           |              |             | !         |
');

Prints:

Colspan for thead
Lorem ipsum dolor sit amet
- right align .
, center align 2x2 cell
another 2x2 +
!

(Since GitHub does not accept style attribute for cells, upper table is made with align attribute which is not supported in HTML5, just to show what will be generated.)

License

Author

KENNYSOFT [email protected]