PHP code example of froala / wysiwyg-cake

1. Go to this page and download the library: Download froala/wysiwyg-cake 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/ */

    

froala / wysiwyg-cake example snippets


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

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

<?= $this->Froala->editor('#froala-editor'');

$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'));