Crudit support Markdown by providing
- Markdown editor Form Type (
Lle\CruditBundle\Form\Type\MarkdownType
). - Markdown interpreter for display (
Lle\CruditBundle\Field\MarkdownField
).
If it's not done yet, install EasyMDE package:
npm install easymde
then run
npm run watch
Usage in form builder:
$builder->add('description', MarkdownType::class);
The rendering in the form will be:
Make sure these packages are installed
composer require twig/markdown-extra twig/extra-bundle league/commonmark
Usage in CrudConfig:
$description = Field::new('description')->setType(MarkdownField::class);