This application demonstrates the markup-carve/laravel-carve package.
Convert Carve to HTML using the @carve Blade directive.
@carve($article->body)
Inject CarveConverterInterface or CarveManager.
$html = $carve->toHtml($content);
Render trusted file-backed content or resolve dynamic snippets from application configuration.
Carve::toHtmlFileWithReport($path)
All bundled extensions: autolink, mentions, TOC, wikilinks, admonitions, tabs, code groups & more.
'extensions' => [
['type' => 'mentions'],
['type' => 'table_of_contents'],
]
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']
Inline literals, definition lists, footnotes, tight vs loose lists, smart typography and escaped block markers.
Type !`*strong*` to show
the literal delimiters.
One source, four outputs: HTML, plain text, Markdown and ANSI terminal.
$carve->toMarkdown($src);
$carve->toAnsi($src);
Trusted symbol replacements and data-source-line markers for editor preview synchronization.
'symbols' => ['spark' => '✦'],
'source_lines' => true,