Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Markdown Laravel Package

spatie/laravel-markdown

Render Markdown in Laravel with a Blade x-markdown component or a configurable MarkdownRenderer. Converts content to HTML with heading IDs, links, and syntax-highlighted code blocks, using options from your config and container resolution.

View on GitHub
Deep Wiki
Context7

title: Customizing the rendering process weight: 8

The markdown given to the x-markdown and MarkdownRenderer will be converted by the class specified in the renderer_class value of the markdown config file.

You can change this value to a class of your own. We highly recommend that your class extends the default Spatie\LaravelMarkdown\MarkdownRenderer class. This default class is organised using easy to override methods.

Here's an example. If you want to customize the environment of the league/commonmark package that is used under the hood, override the configureCommonMarkEnvironment method.

use League\CommonMark\Environment\EnvironmentBuilderInterface;
use Spatie\LaravelMarkdown\MarkdownRenderer;

class MyCustomRenderer extends MarkdownRenderer
{
    public function configureCommonMarkEnvironment(EnvironmentBuilderInterface $environment) : void
    {
        parent::configureCommonMarkEnvironment($environment);
        
        // customize the `$environment` here.
    }
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport