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

Blade Directive Demo

The @carve directive converts Carve markup to HTML.

Basic Usage: @carve

@carve($content)

Source (Carve)

# Welcome to Carve

This is a paragraph with /emphasis/, *strong*, _underline_ and /*both combined*/.

## Features

- Clean, consistent syntax
- Task lists: `[x]` done, `[-]` dropped, `[>]` deferred
- Much more!

> One syntax, one meaning - and the same HTML from every implementation.
^ The Carve design principles

### Code Example

```php
$html = $carve->toHtml('Hello *world*!');
```

Visit the [Carve organization](https://github.com/markup-carve) for more.

Rendered (HTML)

Welcome to Carve #

This is a paragraph with emphasis, strong, underline and both combined.

Features #

  • Clean, consistent syntax
  • Task lists: [x] done, [-] dropped, [>] deferred
  • Much more!

One syntax, one meaning - and the same HTML from every implementation.

The Carve design principles

Code Example #

$html = $carve->toHtml('Hello *world*!');

Visit the Carve organization for more.

Plain Text: @carveText

@carveText($content)

Extracts plain text, useful for search indexing or excerpts:

Welcome to Carve

This is a paragraph with emphasis, strong, underline and both combined.

Features

- Clean, consistent syntax
- Task lists: [x] done, [-] dropped, [>] deferred
- Much more!

"One syntax, one meaning - and the same HTML from every implementation."

The Carve design principles

Code Example

$html = $carve->toHtml('Hello *world*!');

Visit the Carve organization for more.

Safe Rendering for User Content

For user-submitted content, use a safe-mode converter profile via the facade:

{!! Carve::toHtml($content, 'user_content') !!}

Source (User Content)

## User Comment

This is /user submitted/ content.

It uses *safe mode* to prevent XSS:

<script>alert('xss')</script>

The script tag above will be escaped.

Rendered (Safe Mode)

safe_mode: true

User Comment

This is user submitted content.

It uses safe mode to prevent XSS:

<script>alert(‘xss’)</script>

The script tag above will be escaped.

Raw Directive

@carveRaw($trustedContent)

The @carveRaw directive renders Carve without safe mode. Use it only for content you fully control.