diff --git a/README.md b/README.md index 4a2b5cc..7f7e9fb 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,36 @@ composer install nanoblocktech/markdown ``` +Initialize markdown. + ```php $markdown = new Markdown(); +``` -$markdown->text('### Hello'); -$markdown->enableTableOfContents(true); +Configure markdown + +```php +// Enable table of contents +$markdown->tableOfContents(true); + +// Set heading to allow in the table of contents $markdown->setHeadings(['h1', 'h2']); + +// Set id prefix for table of contents +$markdown->setIdPrefix('my-contents-'); + +// Add a base link to markdown +$markdown->setLink('https://example.com/assets/'); + +// Set media type +$markdown->setMediaType('audio/ogg; codecs=opus'); + +// Get table of contents $arry = $markdown->getTableOfContents(); ``` + +Display your markdown text + +```php +$markdown->text('### Hello'); +```