https://github.com/jbzoo/markdown
Rendering markdown from PHP code
https://github.com/jbzoo/markdown
jbzoo markdown php readme rendering text
Last synced: about 1 year ago
JSON representation
Rendering markdown from PHP code
- Host: GitHub
- URL: https://github.com/jbzoo/markdown
- Owner: JBZoo
- License: mit
- Created: 2021-11-03T12:28:27.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-01-28T12:44:12.000Z (over 2 years ago)
- Last Synced: 2024-04-30T07:23:25.392Z (about 2 years ago)
- Topics: jbzoo, markdown, php, readme, rendering, text
- Language: PHP
- Homepage:
- Size: 39.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JBZoo / Markdown
[](https://github.com/JBZoo/Markdown/actions/workflows/main.yml?query=branch%3Amaster) [](https://coveralls.io/github/JBZoo/Markdown?branch=master) [](https://shepherd.dev/github/JBZoo/Markdown) [](https://shepherd.dev/github/JBZoo/Markdown) [](https://www.codefactor.io/repository/github/jbzoo/markdown/issues)
[](https://packagist.org/packages/jbzoo/markdown/) [](https://packagist.org/packages/jbzoo/markdown/stats) [](https://packagist.org/packages/jbzoo/markdown/dependents?order_by=downloads) [](https://github.com/JBZoo/Markdown/blob/master/LICENSE)
### Installing
```sh
composer require jbzoo/markdown
```
### Usage
#### Rendering Table
```php
addAutoIndex('Index', 999)
->setHeaders(['Header #1', 'Header #2'])
->setAlignments([Table::ALIGN_CENTER, Table::ALIGN_RIGHT])
->appendRow(['123', '456'])
->appendRows([
['789_1', '9871'],
['789_2', '']
])
->render();
```
Result
```
| Index | Header #1 | Header #2 |
|------:|:---------:|----------:|
| 999 | 123 | 456 |
| 1000 | 789_1 | 9871 |
| 1001 | 789_2 | |
```
See Live Example
| Index | Header #1 | Header #2 |
|------:|:---------:|----------:|
| 999 | 123 | 456 |
| 1000 | 789_1 | 9871 |
| 1001 | 789_2 | |
#### Rendering other tags
```php
Quote LIne 1
// > Quote LIne 2
// > Quote LIne 3
Markdown::blockquote(["Quote LIne 1\nQuote LIne 2\nQuote LIne 3"]);
Markdown::blockquote(['Quote LIne 1', 'Quote LIne 2', 'Quote LIne 3'])
//
// Quote Text
//
// Some hidden text
//
//
Markdown::spoiler('Quote Text', 'Some hidden text');
// ```php
//