Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

CommonMark for Laravel. Powered by league/commonmark.

Notifications You must be signed in to change notification settings

ArkEcosystemArchive/laravel-commonmark

Repository files navigation

Laravel CommonMark

CommonMark for Laravel. Powered by league/commonmark.

Installation

  1. Require with composer: composer require arkecosystem/commonmark
  2. Publish all the assets / views with php artisan vendor:publish --provider="ARKEcosystem\CommonMark\CommonMarkServiceProvider" --tag=config.
  3. Disable auto-discovery for all fortify packages. This step is required so that we can control the loading order of graham-campbell/markdown and arkecosystem/commonmark.
"extra": {
    "laravel": {
        "dont-discover": ["arkecosystem/commonmark", "graham-campbell/markdown"]
    }
},
  1. 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,

Usage

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.

Embed SimpleCast

![](simplecast:0275fefa-b0e5-4558-b876-09deb95386e6)

Embed Twitter

![](twitter:laravelnews/status/1315392740537044995)

Embed YouTube

![](youtube:Mb-oVVctwyc)