Getting started
Carve is a text markup language for headings, links, lists, and other document content. This CakePHP plugin renders Carve text in templates and provides validation, stored HTML, commands, and caching.
Render your first text in five minutes
- Install the plugin with Composer and load it in
Application::bootstrap(). - Add the
MarkupCarve/CakeCarve.Carvehelper inAppView::initialize(). - Put this in a CakePHP template:
php
<?= $this->Carve->convert('Hello, *CakePHP*.') ?>The page receives:
html
<p>Hello, <strong>CakePHP</strong>.</p>- For saved content, attach the behavior to generate an HTML column.
- Add validation for length and allowed markup. Render visitor text with the comment preset.
Find the next task
| Task | Guide |
|---|---|
| Learn the markup | Carve syntax |
| Render text or files | Rendering and options |
| Render templates | Views and helper |
| Change app defaults | Configuration |
| Process files from the shell | Commands |
| Reuse render results | Caching |
| Add markup features | Extensions |