Download the PHP package kms/froala-editor-bundle without Composer

On this page you can find all versions of the php package kms/froala-editor-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package froala-editor-bundle

KMSFroalaEditorBundle

Package version Build Status Downloads PHP Version Licence

Introduction

This bundle aims to easily integrate & use the Froala editor in Symfony 4.4+/5.0+.

If you want to use it with Symfony < 4.3, see v2 docs. v2.x is compatible with Symfony 2.x to 4.x, but some deprecations are not fixed and static files are integrated to the bundle.

There's also a v3 version available compatible with Symfony 4.3+/5.0+ but the form type options are not prefixed with froala_, which is the major reason for a v4 of the bundle.

The changelogs are available here:

Table of Contents

  1. Migration to Froala Editor bundle v4 from v3
  2. Installation
    1. Step 1: Install the bundle using composer
    2. Step 2: Add the bundle to your bundles.php
    3. Step 3: Import routes
    4. Step 4: Load Twig form widget
    5. Step 5: Configure the bundle
      1. Required
      2. Other options
    6. Step 6: Add Froala to your form
    7. Step 7: Install asset files
    8. Step 8: Display editor content
      1. Manually
      2. Using the Twig extension
    9. Step 9: Profiles (custom configurations)
  3. More configuration
    1. Plugins
    2. Concept: Image upload/manager
    3. Concept: File upload
    4. Concept: Autosave
    5. Webpack Encore configuration
  4. TODO
  5. Licence
  6. Contributing

Migration to Froala Editor bundle v4 from v3

It now supports only Symfony 4.4+ & 5.0+.

If you somehow override/inherit a class from the bundle, be careful as some parameter & return types have been added.

All form type options must now be prefixed by froala_:

Installation

Step 1: Install the bundle using composer

Note: if you install the bundle using Symfony Flex & accepted the recipe, you can skip steps 2 to 4.

Step 2: Add the bundle to your bundles.php

Step 3: Import routes

Step 4: Load Twig form widget

Step 5: Configure the bundle

Required

First, you have to select your language, other settings are optional (see below).

Other options

All Froala options (list provided here) are supported. Just add the option name (prefixed with froala_ if it's in your form type) with your value. If you want to keep Froala default value, don't provide anything in your config file. For options which require an array, provide a value array. For options which require an object, provide a key/value array.

Note that some options need some plugins (all information provided in the Froala documentation).

Example for each option type below:

To provide a better integration with Symfony, some custom options are added, see the full list below:

Step 6: Add Froala to your form

Just add a Froala type in your form:

All configuration items can be overridden:

Step 7: Install asset files

To install the asset files, there is froala:install command that downloads the last version available of Froala Editor and puts it by default in the vendor/kms/froala-editor-bundle/src/Resources/public/froala_editor/ directory:

There are a few arguments/options available:

After you launched the install command, you have to link assets, eg.:

Step 8: Display editor content

Manually

To preserve the look of the edited HTML outside of the editor you have to include the following CSS files:

Also, you should make sure that you put the edited content inside an element that has the class fr-view:

Using the Twig extension

To use the Twig extension, simply call the display function (note that the front CSS file is not included if the parameter includeCSS is false):

Step 9: Profiles (custom configurations)

You can define several configuration profiles that will be reused in your forms, without repeating these configurations.

When using a profile, the root configuration options will be used & overridden:

In this example, profile_1 profile will have these configuration options set:

More configuration

Plugins

All Froala plugins are enabled, but if you don't need one of them, you can disable some plugins...

... or chose only plugins to enable:

Plugins can be enabled/disabled for each Froala instance by passing the same array in the form builder.

Concept: Image upload/manager

This bundle provides an integration of the Froala image upload concept to store your images on your own web server (see custom options for configuration like upload folder).

If you want to use your own uploader, you can override the configuration (if you need to do that, please explain me why to improve the provided uploader).

To provide a better integration with Symfony, some custom options are added, see the full list below:

Concept: File upload

This bundle provides an integration of the Froala file upload concept to store your files on your own web server (see custom options for configuration like upload folder).

If you want to use your own uploader, you can override the configuration (if you need to do that, please explain me why to improve the provided uploader).

To provide a better integration with Symfony, some custom options are added, see the full list below:

Concept: Autosave

The Froala autosave concept to automatically request a save action on your server is working, just enter the correct options in your configuration file:

To provide a better integration with Symfony, some custom options are added, see the full list below:

You can add some parameters in your save route (see custom options).

Webpack Encore configuration

If you want to load Froala asset files using npm/yarn and Webpack Encore, here's how to do it:

Now you can disable Froala bundle CSS/JS inclusion:

Don't forget to import the generated Encore CSS/JS files in your HTML if needed.

TODO

Licence

This bundle provides an integration of the WYSIWYG Froala Editor commercial version. Please read the Froala licence agreement and go to the pricing page if you don't have a licence.

Contributing

Feel free to contribute, like sending pull requests to add features/tests.

Note there are a few helpers to maintain code quality, that you can run using these commands:


All versions of froala-editor-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 || ^8.0
ext-zip Version *
doctrine/inflector Version ^1.4|^2.0
symfony/asset Version ^4.4|^5.0
symfony/console Version ^4.4|^5.0
symfony/framework-bundle Version ^4.4|^5.0
symfony/form Version ^4.4|^5.0
symfony/http-client Version ^4.4|^5.0
symfony/twig-bundle Version ^4.4|^5.0
twig/twig Version ^1.1|^2.0|^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kms/froala-editor-bundle contains the following files

Loading the files please wait ....