ns / simplemde-bundle
This bundle provides the simplemde markdown editor and forms to a symfony bundle
Installs: 7 233
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 5
Open Issues: 3
Type:symfony-bundle
Requires
- php: >=5.5.9
- ext-json: *
- symfony/form: ^2.8|^3.0|^4.0
- symfony/framework-bundle: ^2.8|^3.0|^4.0
README
This bundle provides the simplemde markdown editor
Installation
Add the bundle to your composer.json
file:
require: { // ... "ns/simplemde-bundle": "dev-master" // or use a tag from packagist.org // ... }
Register the bundle with your kernel:
<?php // in AppKernel::registerBundles() $bundles = array( // ... new NS\SimpleMDEBundle\NSSimpleMDEBundle(), // ... );
Add the JS and CSS links to relevant pages
{% block stylesheets %} {{ parent() }} <link rel="stylesheet" type="text/css" id="'+ssId+'" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css" crossorigin="anonymous" /> {% endblock %} {% block javascripts %} {{ parent() }} <script type="text/javascript" id="'+jsId+'" src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js" crossorigin="anonymous"></script> {% endblock %}
Then you can use it as a form type with MarkdownEditorType::class type hint.