sau/md-editor-bundle

MDEditor for Symfony

Installs: 35

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 24

Language:Vue

Type:symfony-bundle


README

Simple markdown editor for Symfony

Install

composer require sau/md-editor-bundle
bin/console assets:install --symlink --relative

If Symfony 4, add in config/bundles.php:

Sau\Bundle\MDEditor\MDEditorBundle::class  => ['all' => true],

Add form in twig:

twig:
    form_themes:
        - '@MDEditor/type/md-editor.html.twig'

and adding scripts/styles to your template

{{asset('bundles/mdeditor/md-editor.js')}}
{{asset('bundles/mdeditor/runtime.js')}}
{{asset('bundles/mdeditor/md-editor.css')}}

if using sonata-admin-bundle add configs to

sonata_admin:
    assets:
        extra_javascripts:
            - bundles/mdeditor/md-editor.js
            - bundles/mdeditor/runtime.js
        extra_stylesheets:
            - bundles/mdeditor/md-editor.css