Download the PHP package froala/wysiwyg-cake without Composer
On this page you can find all versions of the php package froala/wysiwyg-cake. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download froala/wysiwyg-cake
More information about froala/wysiwyg-cake
Files in froala/wysiwyg-cake
Package wysiwyg-cake
Short Description A beautiful WYSIWYG text editor based on HTML5 technology. Cross browser, with mobile support, high performance and Retina Ready modern design.
License proprietary
Homepage https://www.froala.com/wysiwyg-editor
Informations about the package wysiwyg-cake
Froala WYSIWYG Editor Plugin for CakePHP 3
CakePHP Plugin for Froala Javascript WYSIWYG Text Editor. For CakePHP >=3.0.
See froala/wysiwyg-cake2 for CakePHP version 2.
About
The purpose of placing Froala WYSIWYG Editor in a plugin is to keep it separate from a themed view, the regular webroot or the app in general, which makes it easier to update and overall follows the idea of keeping the code clean and modular.
Installation
To use Froala WYSIWYG Editor you need to clone git repository:
git clone git://github.com/froala/wysiwyg-cake.git Plugin/Froala
Or if your CakePHP application is setup as a git repository, you can add it as a submodule:
git submodule add git://github.com/froala/wysiwyg-cake.git Plugin/Froala
Or open terminal/command prompt (windows) type composer require froala/wysiwyg-cake
Alternatively, you can download an archive from the master branch on Github and extract the contents to Froala plugin
.
Make sure that you load the plugin routes by adding to your bootstrap file(bootstrap.php) in config folder:
Plugin::loadAll(); or Plugin::load('Froala'); This will load all plugins at once or only the Froala plugin.
Usage
The Froala helper is basically just a convenience helper that allows you to use php and CakePHP conventions to generate the configuration for Froala and as an extra it allows you to load configs.
How to use the helper
Since CakePHP 3.0 it is necessary to activate the plugin in your application. To do so,
edit app/Config/bootstrap.php
and add the line CakePlugin::load('Froala');
at the
bottom. If you already have CakePlugin::loadAll();
to auto-load all plugins then you may skip this step.
Wherever you want to use it, load it in the controller
open AppController.php (your project/src/controller/AppController) Declare variable public $helpers = array('Froala.Froala');
In the view page (template) add
This is a simple init example with no options for the Froala Editor. Include the below statement in your view template to integrate the plugins in your editor
This will instruct Froala to convert the matched element on the page to Froala editor.
A complete list of Froala configuration options are on the website.
Default options
If you want a quick way to configure default values for all the Froala Editors of an application, you could use the 'Froala.editorOptions' configuration.
Here is an example of a line you could have in bootstrap.php
:
It will make all editors to have a 300px height and apply line braker tags. You may want to override this value for a single editor. To do so, just pass the option to the editor() method and it will override the default value.
Usage examples
Example of init using array of options
Requirements
- PHP version: PHP 5.2+
License
The CakePHP Froala WYSIWYG Editor
project is under MIT license. However, in order to use WordPress Froala WYSIWYG Editor plugin you should purchase a license for it.
Froala Editor has 3 different licenses for commercial use. For details please see License Agreement.
All versions of wysiwyg-cake with dependencies
cakephp/cakephp Version >=3.3.2 <4.0.0
fortawesome/font-awesome Version >=4.4.0