PHP code example of todi1979 / cakephp3-froalaeditor

1. Go to this page and download the library: Download todi1979/cakephp3-froalaeditor library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

todi1979 / cakephp3-froalaeditor example snippets


// Loads Froala Editor javascript also will load all the plugins and css for the plugins
<?= $this->Froala->plugin();

$this->Html->css('/yourapp/Froala/css/froala_editor.min.css');
$this->Html->script('/yourapp/Froala/js/froala_editor.min.js');

class AppController extends Controller
{
	...
	
	public $helpers = array('Froala.Froala');
	
	...
}

$this->Froala->plugin();
$this->Froala->editor('selector');

Configure::write('Froala.editorOptions', array('height' => '300px'));


// '#comment'  Represents the html element selector.
// 'array()'   Represents the list of options that are passed to the editor.

$this->Froala->editor('#comment', array('minHeight => '200px', 'maxHeight' => '400px'));
                  


<?= $this->Html->script(array('http://code.jquery.com/jquery-1.11.0.min.js'));