Extract plain text from Carve markup for search indexing, excerpts, or previews.
# 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.
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.
@carveText($article->body)
{{ Carve::toText($article->body) }}
$text = $carve->toText($carveContent);
// Use for search indexing
Scout::index($article->id, ['content' => $text]);
// Use for excerpts
$excerpt = Str::limit($text, 200);