cl4u/epic-editor-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Use EpicEditor in your Symfony 2 Forms

Installs: 498

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 10

Forks: 0

Language:JavaScript

dev-master / 1.0.x-dev 2017-03-30 09:50 UTC

This package is not auto-updated.

Last update: 2023-10-11 07:11:18 UTC


README

Use EpicEditor into your Symfony 2 Forms

Installation

Require the library in your composer.json file:

{
    "require": {
        "cl4u/epic-editor-bundle" : "~1.0"
    }
}

Register the Bundle in your app/AppKernel.php

new Cl4u\Bundle\EpicEditorBundle\Cl4uEpicEditorBundle(),

Usage

Include the JavaScript library

Include the JS in your head block

{{ epic_editor_javascript() }}

Use the Epic Editor form type

Simply call on your FormBuilder:

$builder->add('field', 'epic_editor', array('options' = array()))

Use a different version of EpicEditor

This bundle comes with EpicEditor v0.2.2. You can replace this with your own version by setting the parameter:

cl4u_epic_editor:
    js_path: 'bundles/cl4uepiceditor/js/epiceditor.min.js'

Configuration options

The complete list of options can be configured by the following parameter values:

cl4u_epic_editor:
    js_path: 'bundles/cl4uepiceditor/js/epiceditor.min.js'
    options:
        base_path: 'bundles/cl4uepiceditor/css'
        client_side_storage: false
        local_storage_name: epic_editor
        use_native_fullscreen: false
        parser: marked
        focus_on_load: false
        file:
            name: ~
            default_content: ~
            auto_save: 100
        theme:
            base: '/themes/base/epiceditor.css'
            editor: '/themes/editor/epic-dark.css'
            preview: '/themes/preview/github.css'
        button:
            preview: true
            fullscreen: true
            bar: true
        shortcut:
            modifier: 18
            fullscreen: 80
            preview: 70
        string:
            toggle_preview: 'Toggle Preview Mode'
            toggle_edit: 'Toggle Edit Mode'
            toggle_fullscreen: 'Enter Fullscreen'
        autogrow:
            min_height: 200
            max_height: 200
            scroll: true