Skip to content

Latest commit

 

History

History
54 lines (34 loc) · 905 Bytes

markdown.md

File metadata and controls

54 lines (34 loc) · 905 Bytes

Markodwn

Crudit support Markdown by providing

  • Markdown editor Form Type (Lle\CruditBundle\Form\Type\MarkdownType).
  • Markdown interpreter for display (Lle\CruditBundle\Field\MarkdownField).

MarkdownType

Before

If it's not done yet, install EasyMDE package:

npm install easymde

then run

npm run watch

Usage

Usage in form builder:

$builder->add('description', MarkdownType::class);

The rendering in the form will be:

MarkdownField

Before

Make sure these packages are installed

composer require twig/markdown-extra twig/extra-bundle league/commonmark

Usage

Usage in CrudConfig:

$description = Field::new('description')->setType(MarkdownField::class);

The rendering in the page will be: