The Carve facade is ideal for inline rendering and quick one-liners.
{!! Carve::toHtml('/emphasis/ and *strong*') !!}
Result:
emphasis and strong
| Carve Input | Rendered Output |
|---|---|
*strong text* |
strong text |
_emphasized text_ |
emphasized text |
`inline code` |
|
[link](https://github.com/markup-carve/carve) |
|
H{,2,}O |
H2O |
E=mc{^2^} |
E=mc2 |
{=highlighted=} |
highlighted |
{-deleted-} {+inserted+} |
|
{{ Carve::toText('# Hello *World*') }}
Result: Hello World
Pass a converter name as the second argument to use a different profile:
{!! Carve::toHtml($content, 'user_content') !!}
See Safe Mode Demo for XSS protection examples.