Static preview. Server-backed interactions are available only in a local checkout.

Laravel Carve Demo

This application demonstrates the markup-carve/laravel-carve package.

GitHub · Carve · Laravel 13.33.0

@carve Directive

Convert Carve to HTML using the @carve Blade directive.

@carve($article->body)

View Demo →

Carve Facade

Use Carve::toHtml() for inline strings.

{!! Carve::toHtml($content) !!}

View Demo →

Service Injection

Inject CarveConverterInterface or CarveManager.

$html = $carve->toHtml($content);

View Demo →

Form Integration

Use ValidCarve rule in Form Requests.

'body' => [new ValidCarve()]

View Demo →

Safe Mode

XSS protection for untrusted user content.

'safe_mode' => true

View Demo →

Static Mode

Graceful degradation for print, PDF and email targets.

'mode' => 'static'

View Demo →

Plain Text

Extract plain text for indexing or previews.

@carveText($article->body)

View Demo →

Includes

Render trusted file-backed content or resolve dynamic snippets from application configuration.

Carve::toHtmlFileWithReport($path)

View Demo →

Extensions

All bundled extensions: autolink, mentions, TOC, wikilinks, admonitions, tabs, code groups & more.

'extensions' => [
    ['type' => 'mentions'],
    ['type' => 'table_of_contents'],
]

View Demo →

Live Diagram Gallery

All eight fenced-diagram types drawn live: Mermaid, PlantUML, Graphviz, D2, Vega-Lite, WaveDrom, Chart.js and ABC - plus the sanitized SVG image fence.

['type' => 'fenced_render',
 'language' => 'vega-lite',
 'content_mode' => 'json']

View Demo →

Syntax & What is New

Inline literals, definition lists, footnotes, tight vs loose lists, smart typography and escaped block markers.

Type !`*strong*` to show
the literal delimiters.

View Demo →

Render Targets

One source, four outputs: HTML, plain text, Markdown and ANSI terminal.

$carve->toMarkdown($src);
$carve->toAnsi($src);

View Demo →

Editor Preview Metadata

Trusted symbol replacements and data-source-line markers for editor preview synchronization.

'symbols' => ['spark' => '✦'],
'source_lines' => true,

View Demo →