Weave 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

Markdom Laravel Package

sinnbeck/markdom

Markdom is a Laravel/PHP package that parses Markdown into a manipulable DOM, letting you add classes, attributes, and custom transformations before rendering HTML. It offers a clean, extensible API for flexible Markdown output.

View on GitHub
Deep Wiki
Context7

A markdown parser for laravel for making beautiful html

Frequently asked questions about Markdom
What is sinnbeck/markdom used for in Laravel?
Markdom is a Laravel/PHP package that parses Markdown into a manipulable DOM so you can add classes, attributes, and custom transformations before rendering HTML. It fits Laravel apps with server-rendered Blade content such as docs, CMS pages, marketing content, and email templates. It is not aimed at API-only services or non-Laravel PHP stacks.
How do I install sinnbeck/markdom with Composer?
Install it with Composer using the package name sinnbeck/markdom, then follow the repository README for optional config or view publishing. The assessment describes initial integration as low effort, with a proof of concept achievable in hours. Confirm the package constraints against your Laravel and PHP versions before adopting it.
Which Laravel and PHP versions does Markdom support?
The provided assessment does not include a tested compatibility matrix. Check the package composer.json constraints and run CI installs against your target Laravel and PHP versions. Treat version support as something to verify before production adoption.
Does Markdom sanitize HTML or allow raw HTML passthrough?
The assessment flags sanitization and raw HTML behavior as unconfirmed and a key production risk. It does not state that Markdom sanitizes HTML by default, so do not render untrusted Markdown until you verify escaping and sanitization in source and tests. Add XSS payload tests before using it with user-generated content.
Is Markdom a wrapper around league/commonmark or a custom parser?
The assessment says this needs confirmation and does not identify the underlying parser. Inspect composer.json and the source to see whether Markdom wraps league/commonmark or implements a custom parser. That answer determines how easily you can swap renderers later.
Can I add CSS classes and attributes to Markdown elements with Markdom?
Yes, that is the package's stated purpose: parse Markdown into a manipulable DOM and add classes, attributes, and custom transformations before rendering HTML. This is useful for consistent styling in Laravel Blade views. Keep transformations behind your own adapter if you may switch parsers later.
Does Markdom support tables, footnotes, task lists, or syntax highlighting?
The assessment lists these as features to verify rather than confirmed capabilities. Test representative Markdown for tables, footnotes, task lists, and syntax highlighting against the package before relying on them. If a feature is missing, confirm whether extensions or a different renderer are needed.
Is Markdom safe for user-generated content in production?
The assessment rates this as moderate to high risk without additional hardening, citing potential XSS, a small community footprint, and maintenance concerns. It is more suitable for low-risk internal or trusted content first. Use it for user-generated content only after sanitization, caching, and regression tests are proven.
Can I cache Markdom output?
The assessment asks whether parsed output is cacheable and whether the package provides caching hooks, but does not confirm support. You can cache rendered HTML at the application layer, but verify invalidation and that caching does not bypass sanitization. Test cache behavior before scaling content volume.
What are alternatives to Markdom for a headless or API-first Markdown pipeline?
For API-first, headless, or multi-framework systems, the assessment recommends using league/commonmark directly and avoiding the Laravel-specific wrapper. Within Laravel, compare Markdom with other Blade-friendly Markdown renderers and keep it behind an internal MarkdownRenderer interface. That adapter makes migration a configuration change rather than a rewrite.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo