helios-ag/fm-summernote-bundle

Summernote bundle, adds Summernote WYSIWYG editor to your Symfony2/3/4 project

Installs: 15 769

Dependents: 0

Suggesters: 4

Security: 0

Stars: 5

Watchers: 1

Forks: 13

Open Issues: 1

Type:symfony-bundle

0.2 2016-04-16 05:47 UTC

This package is auto-updated.

Last update: 2021-03-27 16:15:40 UTC


README

FMSummernoteBundle adds summernote bundle

StyleCI Downloads Version License
StyleCI Total Downloads Latest Stable Version License

Installation

Step 1: Installation

Using Composer, just add the following configuration to your composer.json:

Or you can use composer to install this bundle: Add FMSummernoteBundle in your composer.json:

composer require helios-ag/fm-summernote-bundle

Step 2: Enable the bundle

Finally, enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new FM\SummernoteBundle\FMSummernoteBundle(),
    );
}

Configuration

You can configure the bundle as follows, but note that the plugins "elfinder" and "video" are not supported in Jquery2.x.

fm_summernote:
    plugins:
        - video
        - elfinder # by default plugins not set, bundle comes with elfinder plugin / provides integration with FMElfinderBundle
    selector: .summernote #defines summernote selector for apply to
    toolbar: # define toolbars, if no toolbar configured, default toolbars defined
        style: [style]
        bold: [bold]
    extra_toolbar: # extra toolbar can be used for plugins toolbar and as additional toolbar setings, when 'toolbar' option is omitted
        elfinder: [elfinder]
    width: 600
    height: 400
    language: '' # define language (with language culture code like de-DE, fr-FR, etc.) by default, it is in english
    include_jquery: true #include js libraries, if your template already have them, set to false
    include_bootstrap: true
    include_fontawesome: true

Usage

Twig template example

    {{ summernote_init() }}
    <textarea class="summernote"></textarea>