CommonMark for Laravel. Powered by league/commonmark.
- Require with composer:
composer require arkecosystem/commonmark
- Publish all the assets / views with
php artisan vendor:publish --provider="ARKEcosystem\CommonMark\CommonMarkServiceProvider" --tag=config
. - Disable auto-discovery for all fortify packages. This step is required so that we can control the loading order of
graham-campbell/markdown
andarkecosystem/commonmark
.
"extra": {
"laravel": {
"dont-discover": ["arkecosystem/commonmark", "graham-campbell/markdown"]
}
},
- Register the service providers in this exact order. This will ensure that our package can overwrite any bindings that
graham-campbell/markdown
created.
GrahamCampbell\Markdown\MarkdownServiceProvider::class,
ARKEcosystem\CommonMark\CommonMarkServiceProvider::class,
This package provides parsing and rendering for CommonMark. All the specifications and examples can be seen at https://commonmark.org/. There are a few custom elements that can be used to embed third-party content.
![](simplecast:0275fefa-b0e5-4558-b876-09deb95386e6)
![](twitter:laravelnews/status/1315392740537044995)
![](youtube:Mb-oVVctwyc)